Skip to content

Instantly share code, notes, and snippets.

@tjvr
Last active August 29, 2015 14:21
Show Gist options
  • Save tjvr/5a47b400a6e5855e2e30 to your computer and use it in GitHub Desktop.
Save tjvr/5a47b400a6e5855e2e30 to your computer and use it in GitHub Desktop.
No comment
?|..| imports standard library
---------------------------------------------------------
% zero
?… import library named …
…$… define export named string … with value …
can't export digit as logical value
can't export infinity as ∞
?single-character strings are special-cased as values
# error: reserved
---------------------------------------------------------
special forms [can't be assigned]
[…]
|…|
---------------------------------------------------------
In precedence order:
!|…| comment
: statement separator
[put after comments]
… = … assignment (reassigns meaning of *token*)
???-assoc
==… equality (returns 1 or 0)
+ add
- sub
, mul
/ floor-div
div-by-zero is infinity
; mod
@… write utf8 to stdout
if infinity, program hangs
…&… eval-apply
in caller's context plus right operand `*`
right-associative
returns alue of last statement in eval
These are all lowest precedence (bind the tightest):
|…| interpret binary representation of utf8 string as a
number
<…> parens
'… identifier
^ read utf8 from stdin
returns -1 if eof
~… literal
8 infinity
---------------------------------------------------------
…[…]… conditional
right-recursive
either 1 or 0 or error
@tjvr
Copy link
Author

tjvr commented May 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment