Improved examples
This commit is contained in:
parent
60325b23a3
commit
205cd340b5
|
@ -1,4 +1,4 @@
|
|||
?(?0 ()) (This example demonstrates how to implement combinatory calculus.)
|
||||
?(?-) (This example demonstrates how to implement combinatory calculus.)
|
||||
|
||||
<> (M ?x) (?x ?x)
|
||||
<> (KI ?x ?y) (?y)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
?(?0 ()) (This example prints to the console and demonstrates how to delay the execution of a rule.)
|
||||
?(?-) (This example prints to the console and demonstrates how to delay the execution of a rule.)
|
||||
|
||||
<> (NAME) (Modal)
|
||||
<> (?: print String) (?:)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
?(?0 ()) (This example requests 3 line delimited strings from the console.)
|
||||
?(?-) (This example requests 3 line delimited strings from the console.)
|
||||
|
||||
<> (read ?~) (?~)
|
||||
<> (?: print ') (?:)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
?(?0 ()) (This example demonstrates how to keep the runtime active between prompts.)
|
||||
?(?-) (This example demonstrates how to keep the runtime active between prompts.)
|
||||
|
||||
<> ((You said: quit\n) send) ((You quit.) print ')
|
||||
<> (?: print ') (?:)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
?(?0 ()) (This example prints hello world to the console.)
|
||||
?(?-) (This example prints hello world to the console.)
|
||||
|
||||
<> (send ?:) (?:)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
?(?0 ()) (This example reverses the string modal, into ladom.)
|
||||
?(?-) (This example reverses the string modal, into ladom.)
|
||||
|
||||
<> (reverse List () ?*) (?*)
|
||||
<> (reverse (?*)) (reverse List (?*) ())
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
?(?-) (This example tests various aspects of the implementation.)
|
||||
|
||||
<> (explode ?*) (str (?*))
|
||||
<> (reverse (str (?h ?t))) (reverse/l ?t (?h))
|
||||
<> (reverse (str (?h))) (?h)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
?(?0 ()) (This example demonstrates how to implement a 2-players game of Tic Tac Toe)
|
||||
?(?-) (This example demonstrates how to implement a 2-players game of Tic Tac Toe)
|
||||
|
||||
<> (-- ?x) ()
|
||||
<> (READ ?~) (?~)
|
||||
|
|
|
@ -144,8 +144,7 @@ parse_frag(char *s)
|
|||
s++;
|
||||
while(s < ss - 1) *dict_++ = *s++;
|
||||
s++;
|
||||
}
|
||||
else
|
||||
} else
|
||||
while(s < ss) *dict_++ = *s++;
|
||||
}
|
||||
*dict_++ = 0;
|
||||
|
|
Loading…
Reference in New Issue