Skip to content

Toy programming language based on pattern matching

Notifications You must be signed in to change notification settings

andiogenes/daria

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daria

Toy programming language with naive pattern matching design and implementation.

Code samples

; Boolean logic
and :true :true = :true
and _ _ = :false

or :false :false = :false
or _ _ = :true

> and :true :false ; => :false
> and :false :true ; => :false
> or :true :false ; => :true
> or :false :true => :true
> and (or :true :false) (or :false :true) ; => :true

; Identity function
i x = x

> i :foo ; => :foo
> i :bar ; => :bar
> i :baz ; => :baz
> i (or :false :true) ; => :true

; Conditionals
if :true x _ = x
if :false _ x = x

> if (and (or :true :false) (or :false :true)) :foo :bar ; => :true

Feedback

You can suggest your ideas and comment the code via Issues.

Status

travis-ci codecov

About

Toy programming language based on pattern matching

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages