Jump to navigation Jump to search
- This is still a work in progress. It may be changed in the future.
- This article is a stub, which means that it is not detailed enough and needs to be expanded. Please help us by .
||Pipe: Starts with the value v, passes it to each function, and sets the new value to the value returned from the function call. Ignores all further arguments passed to it.|
||Disperse: Passes all arguments passed to it to each function in order.|
||Output: Outputs all arguments as strings to the console.|
||Ignore: Forces the function to execute with the arguments specified. Ignores all further arguments passed to it.|
||Swap: Forces the function inside to curry backwards instead of forwards, inner function recieves args baaa...|
||Range: Creates a range from 1-v (inclusive)|
||Anti: Reverses the array, and all items of the array.|
||Map: For each item in the array, calls the function with the item as an argument.|
||Negate: Negates the value from v to -v.|
||Subtract: Subtracts b from a.|
||Add: Adds b from a.|
||Multiply: Multiplies b with a.|
||Divide: Divides a by b, rounds down to the nearest integer.|
||Modulo: Divides a by b, and returns the remainder|
Arithmetic with arrays
Numbers are represented by nested arrays, so 0 is , 1 is [], 2 is [[]], etc... The code
calculates 2*3, and returns it.
99 Bottles of beer
[P[[[[[[[[[[[]]]]]]]]]][*[[[[[[[[[[]]]]]]]]]]][S[-1]]RA[M[D[[S[; bottles of beer on the wall! ]][S[; bottles of beer on the wall, ]][S[; bottles of beer! Take one down, pass it around, ]]]]][I[;No more bottles of beer on the wall! No more bottles of beer on the wall, No more bottles of beer! Go to the store and buy some more, 99 bottles of beer on the wall!]]]]