diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-01 15:52:56 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-01 15:53:21 -0800 |
| commit | a82b0d9d2435cca72629c1e5e73cdcb89f728ac0 (patch) | |
| tree | 638cd1b321dde44e200d3346e5b6fd0152774470 /examples/how_do_i.nom | |
| parent | b6d3cbd61cd08e39d20a569b7c5ece6bb25897dd (diff) | |
Added support for $(foo 1 baz 2) as a way to access (foo 1 baz 2)'s
meaning.
Diffstat (limited to 'examples/how_do_i.nom')
| -rw-r--r-- | examples/how_do_i.nom | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/how_do_i.nom b/examples/how_do_i.nom index e3c58d6..d40c7f4 100644 --- a/examples/how_do_i.nom +++ b/examples/how_do_i.nom @@ -1,4 +1,5 @@ #!/usr/bin/env nomsu -V6.13.12.8 + # How do I... # Write a comment? Put a # and go till the end of the line # How do I write a multi-line comment? @@ -313,9 +314,9 @@ debug only: # Function literals look like: $x -> ($x * $x) say (best of [2, -3, 4, -8] according to ($x -> ($x * $x))) -# Or, you can use ((foo $)'s meaning) to access the function that gets called by (foo $) +# Or, you can use $(foo $) to access the function that gets called by (foo $) ($x squared) means ($x * $x) -say (best of [2, -3, 4, -8] according to (($ squared)'s meaning)) +say (best of [2, -3, 4, -8] according to $($ squared) # But nomsu was designed with flexible alternatives that are often better than passing functions. For example, instead of calling a key function on every item, you could instead define a macro |
