-
Notifications
You must be signed in to change notification settings - Fork 0
Operators
João Pedro Neto edited this page Nov 9, 2020
·
38 revisions
check notes below for table interpretation
Assuming a
as the top of the stack
Fraction | Character | List | |
---|---|---|---|
↑ |
a+1 | next char in codebase | Map ↑ a |
↓ |
a-1 | prev char in codebase | Map ↓ a |
! |
Factorial of a | Factorial of c(a) | Map ! a |
Assuming b
as the top of the stack, a
below b
Frac×Frac | Frac×Chr | Chr×Frac | Chr×Chr | Frac×List | List×Frac | Chr×List | List×Chr | List×List | |
---|---|---|---|---|---|---|---|---|---|
+ |
a+b | u(a+cb) | u(ca+b) | u(ca+cb) | M +a b |
M +b a |
M +ca b |
M +cb a |
M + zip(a,b) |
- c(char) is the value of char in the codebase; ca means c(a)
- u(n) is the char with codebase n; ua means u(a)
- Fraction
x
rounds to⌊x⌋
when needed as int -
Map op
/M op
means map operationop
over elements of String/List (recursively with lists of lists) - unless stated otherwise,
- zip/zipWith cycle the smaller list
- string operators consider a circular codebase; eg. i=(i+1)%256