You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# define symbols with names that have a change of not getting in the way of code people want to write
space = (num 0 3 2)
! = (succ space)
quot = (succ !)
hash = (succ quot)
dol = (succ hash)
perc = (succ dol)
amp = (succ perc)
apost = (succ amp)
open = (succ apost)
close = (succ open)
star = (succ close)
plus = (succ star)
comma = (succ plus)
dash = (succ comma)
dot = (succ dash)
/ = (succ dot)
_0 = (succ /)
_1 = (succ _0)
_2 = (succ _1)
_3 = (succ _2)
_4 = (succ _3)
_5 = (succ _4)
_6 = (succ _5)
_7 = (succ _6)
_8 = (succ _7)
_9 = (succ _8)
: = (succ _9)
; = (succ :)
< = (succ ;)
eq = (succ <)
> = (succ eq)
? = (succ >)
@ = (succ ?)
A = (succ @)
B = (succ A)
C = (succ B)
D = (succ C)
E = (succ D)
F = (succ E)
G = (succ F)
H = (succ G)
I = (succ H)
J = (succ I)
K = (succ J)
L = (succ K)
M = (succ L)
N = (succ M)
O = (succ N)
P = (succ O)
Q = (succ P)
R = (succ Q)
S = (succ R)
T = (succ S)
U = (succ T)
V = (succ U)
W = (succ V)
X = (succ W)
Y = (succ X)
Z = (succ Y)
[ = (succ Z)
back = (succ [)
] = (succ back)
^ = (succ ])
_ = (succ ^)
` = (succ _)
a = (succ `)
b = (succ a)
c = (succ b)
d = (succ c)
e = (succ d)
f = (succ e)
g = (succ f)
h = (succ g)
i = (succ h)
j = (succ i)
k = (succ j)
l = (succ k)
m = (succ l)
n = (succ m)
o = (succ n)
p = (succ o)
q = (succ p)
r = (succ q)
s = (succ r)
t = (succ s)
u = (succ t)
v = (succ u)
w = (succ v)
x = (succ w)
y = (succ x)
z = (succ y)
, = cons
] = nil
# Using these the fizzbuzz messages become more readable
fizzmsg = (, F (, i (, z (, z ]))))
buzzmsg = (, B (, u (, z (, z ]))))
fizzbuzzmsg = (, F (, i (, z (, z (, b (, u (, z (, z ]))))))))
# and the following program becomes valid
(print-list (, I (, space (, L (, I (, K (, E (, space (, S (, H (, E (, E (, P (, D (, A (, ! ]))))))))))))))))
Might also be nice to be able to infix an operator eventually, but I suppose that is not the lambda way
Thanks for Sheepda
I thought it might be convenient to have symbols in Sheepda just to make the example code a bit more readable.
The text was updated successfully, but these errors were encountered: