Skip to content
/ fl-hs Public

Beginnings of an implementation of John Backus's FL in Haskell

Notifications You must be signed in to change notification settings

jgrimes/fl-hs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fl-hs

Work in progress -- only a few things work and the code ain't great.

λ> repl
FL> def length == comp:<+,map:~1>
"Defined."
FL> length:<1,2,3>
(D <Atom: Number 3 >,[])
FL> map:length:<<1,2,3,4,5>,<53,67,12,4>,<6>>
(D <Seq: [<Atom: Number 5 >,<Atom: Number 4 >,<Atom: Number 1 >] >,[])

Now with recursive definitions...

λ> repl
FL> def eq0 == comp:<=,[id,~0]>
"Defined."
FL> def sub1 == C:+:-1
"Defined."
FL> def fact == eq0 -> ~1; comp:<*,[id,comp:<fact,sub1>]>
"Defined."
FL> fact:5
(D <Atom: Number 120 >,[])
FL> fact:3
(D <Atom: Number 6 >,[])
FL> fact:50
(D <Atom: Number 30414093201713378043612608166064768844377641568960512000000000000 >,[])

About

Beginnings of an implementation of John Backus's FL in Haskell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published