Add README for go-to-definition tool

Signed-off-by: Kakadu <Kakadu@pm.me>
This commit is contained in:
Kakadu 2020-12-24 01:47:21 +03:00
parent a48db74053
commit 5356537fd0
4 changed files with 61 additions and 17 deletions

15
tools/demo1.lama Normal file
View file

@ -0,0 +1,15 @@
public fun foldl (f, acc, l) {
-- ^-- (1,19)
case l of
{} -> acc
| x : xs -> foldl (f, f (acc, x), xs)
-- (5,22)--^ ^-- (5,25)
esac
}
public fun filter (f, l) {
case l of
{} -> {}
| h : t -> if f (h) then h : filter (f, t) else filter (f, t) fi
esac
}