Toy programming language with naive pattern matching design and implementation.
; 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
You can suggest your ideas and comment the code via Issues.