Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: function commentary order #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions content/posts/currying/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,17 @@ let multiParamFn (p1:int)(p2:bool)(p3:string)(p4:float)=
() //do nothing

let intermediateFn1 = multiParamFn 42
// intermediateFn1 takes a bool
// and returns a new function (string -> float -> unit)
// intermediateFn1 takes an int
// and returns a new function (bool -> string -> float -> unit)
let intermediateFn2 = intermediateFn1 false
// intermediateFn2 takes a string
// and returns a new function (float -> unit)
// intermediateFn2 takes a bool
// and returns a new function (string -> float -> unit)
let intermediateFn3 = intermediateFn2 "hello"
// intermediateFn3 takes a float
// and returns a simple value (unit)
// intermediateFn3 takes a string
// and returns a new function (float -> unit)
let finalResult = intermediateFn3 3.141
// finalResult takes a float
// and returns a simple value (unit)
```

The signature of the overall function is:
Expand Down