Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
18
Task/Extend-your-language/ATS/extend-your-language.ats
Normal file
18
Task/Extend-your-language/ATS/extend-your-language.ats
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
(* Languages with pattern matching ALREADY HAVE THIS! *)
|
||||
|
||||
fn
|
||||
func (pred1 : bool, pred2 : bool) : void =
|
||||
case+ (pred1, pred2) of
|
||||
| (true, true) => println! ("(true, true)")
|
||||
| (true, false) => println! ("(true, false)")
|
||||
| (false, true) => println! ("(false, true)")
|
||||
| (false, false) => println! ("(false, false)")
|
||||
|
||||
implement
|
||||
main0 () =
|
||||
begin
|
||||
func (true, true);
|
||||
func (true, false);
|
||||
func (false, true);
|
||||
func (false, false)
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue