Line-expressions is a data notation created in 2019 by Jay McCarthy.
#2908on PLDB | 6Years Old |
Line-expressions (L-expressions or Lexprs) are like S-expressions, but with more syntactic categories and without as much required notation. Like S-expressions, they mostly lack a semantic interpretation.
fun ksum(k, l) :
match l \
| empty :
; This is my favorite number!
0
| cons(a, d) :
(a + k * ksum(k, d))
fun timed_thunk(thunk) :
let before = now()
let answer = thunk()
let after = now()
println {It took @(after - before) seconds}
answer
mac timed \
| [_ e] :
'timed_thunk([位() : e])