Lit | Desc | Arg Types | Example | |||
---|---|---|---|---|---|---|
integer |
| 3 → 3 | ||||
" | string |
| "hi\n" → "hi\n" | |||
' | char |
| 'b' → 'b' | |||
$ | 1st arg | ;1;2;3 $ → 1,2,3,3 | ||||
@ | 2nd arg | ;1;2;3 @ → 1,2,3,2 | ||||
_ | 3rd arg | ;1;2;3 _ → 1,2,3,1 | ||||
; | save |
| + ;3 $ → 6 | |||
: | append |
| :"abc" "def" → "abcdef" | |||
+ | add |
| +2 1 → 3 | |||
* | multiply |
| *7 6 → 42 | |||
- | subtract |
| - 5 3 → 2 | |||
/ | divide |
| /7 2 → 3 | |||
% | modulus |
| %7 2 → 1 | |||
^ | pow |
| ^2 8 → 256 | |||
+ | sum |
| +,3 → 6 | |||
+ | concat |
| +.,3,$ → [1,1,2,1,2,3] | |||
. | map |
| ."abc"+1$ → "bcd" | |||
| | filter |
| |,5%$2 → [1,3,5] | |||
/ | foldr1 |
| /,3+@$ → 6 | |||
\ | reverse |
| \,3 → [3,2,1] | |||
, | length |
| ,"asdf" → 4 | |||
< | take |
| <3"asdfg" → "asd" | |||
> | drop |
| >3,5 → [4,5] | |||
, | range 1.. |
| ,3 → [1,2,3] | |||
^ | replicate |
| ^3"ab" → "ababab" | |||
= | subscript |
| =2 "asdf" → 's' | |||
? | index |
| ? "abc" 'b' → 2 | |||
- | diff |
| -"abcd" "bd" → "ac" | |||
% | split |
| %"a b c" " " → ["a","b","c"] | |||
* | join |
| *" ",3 → "1 2 3" | |||
& | justify |
| & " " 4 "hi" → " hi" | |||
o | ord |
| o'd' → 100 | |||
? | if/else |
| ? 0 "T" "F" → "F" | |||
p | show |
| p"a" → "\"a\"" | |||
ct | debug context types | ;5 ct → error"$ :: Integer ..." |