Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # K quick reference
- Adapted from http://kparc.com/k.txt
- ### Verbs (functions):
- Functions are overloaded, and can be used
- in both a unary and binary way.
- `# (1 2 3)` - `#` is used in the unary way, meaning `head`, and returns `1`.
- `2 # (1 2 3)` - `#` is used in the binary way, meaning `take`, and returns `(1 2)`.
- (unary) (binary)
- : assign
- + flip plus
- - negate minus
- * first times
- % sqrt divide
- ! enum|key mod|map
- & where min|and
- | reverse max|or
- < asc less
- > desc more
- = group equal
- ~ not match
- , enlist concat
- ^ null except
- # count take|rsh
- _ floor drop|cut
- $ string cast|sum
- ? distinct find|rnd
- @ type at
- . eval|val dot
- ### Adverbs (higher order functions):
- ' each
- / over|join / fold
- \ scan|split
- ': eachprior / eachpair
- /: eachright
- \: eachleft
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement