Skip to content

Commit

Permalink
add imap to world DSL reference
Browse files Browse the repository at this point in the history
  • Loading branch information
byorgey committed Jun 26, 2024
1 parent d09ce76 commit fcd1f1b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions data/worlds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ repetitions of `S` separated by `,`.
| 'let' (<ident> '=' <exp>)*, 'in' <exp>
| 'overlay' '[' <exp>+, ']'
| 'mask' <atom> <atom>
| 'imap' <atom> <atom> <atom>
| '"' <nonquote>+ '"'
| '(' <exp> ')'
Expand Down Expand Up @@ -186,4 +187,9 @@ entities but also some empty cells.
https://libnoise.sourceforge.net/glossary/index.html#perlinnoise
- `mask b e` takes the value of `e` where `b` is true, and is empty
elsewhere.
- `imap` has type `World int -> World int -> World a -> World a`, and
creates a new world from a reference world using the given index
lookup functions. That is, `imap wx wy wa` yields the world
`\c -> wa (wx c, wy c)`. For example, `imap (-x) y w` reflects the
world `w` across the line `y = 0`.
- `"foo"` imports the DSL term in `worlds/foo.world`.

0 comments on commit fcd1f1b

Please sign in to comment.