on master help sign in
Merge pull request #924 from urbit/currying-functions
3b4fad1David Kerschner
reference/library/2n.md+2−2
@@ -67,7 +67,7 @@ Build `f` such that
67```
67```
68
68
69---
69---
70−### `++curr`
70+### `++curr` {#curry}
71
71
72Right curry
72Right curry
73
73
@@ -424,4 +424,4 @@ A flag.
424 %.y
424 %.y
425```
425```
426
426
427−---
427+---
tutorials/hoon/doors.md+4
@@ -355,6 +355,10 @@ Readers with some mathematical background may notice that `~( )` expressions all
355
355
356Thus, you may think of the `c` door as a function for making functions. Use the `~(arm c arg)` syntax -- `arm` defines which kind of gate is produced (i.e., which arm of the door is used to create the gate), and `arg` defines the value of `b` in that gate, which in turn affects the product value of the gate produced.
356Thus, you may think of the `c` door as a function for making functions. Use the `~(arm c arg)` syntax -- `arm` defines which kind of gate is produced (i.e., which arm of the door is used to create the gate), and `arg` defines the value of `b` in that gate, which in turn affects the product value of the gate produced.
357
357
358+The standard library provides [currying
359+functionality](@/docs/reference/library/2n.md#curry) outside of the context of
360+doors - see `+curr` and `+cury`.
361+
358#### Creating Doors with a Modified Sample
362#### Creating Doors with a Modified Sample
359
363
360In the above example we created a door `c` with sample `b=@` and found that the initial value of `b` was `0`, the bunt value of `@`. We then created new door from `c` by modifying the value of `b`. But what if we wish to define a door with a chosen sample value directly? We make use of the `$_` rune, whose irregular form is simply `_`. To create the door `c` with the sample `b=@` set to have the value `7` in the dojo, we would write
364In the above example we created a door `c` with sample `b=@` and found that the initial value of `b` was `0`, the bunt value of `@`. We then created new door from `c` by modifying the value of `b`. But what if we wish to define a door with a chosen sample value directly? We make use of the `$_` rune, whose irregular form is simply `_`. To create the door `c` with the sample `b=@` set to have the value `7` in the dojo, we would write