Family Day update

This commit is contained in:
Ingy döt Net 2020-02-17 23:21:07 -08:00
parent aac6731f2c
commit 9ad63ea473
2442 changed files with 39761 additions and 8255 deletions

View file

@ -0,0 +1 @@
(dolist (x the-list) (print x))

View file

@ -0,0 +1,4 @@
(use-package :iterate)
(iter
(for x in the-list)
(print x))

View file

@ -0,0 +1,4 @@
(let ((the-list '(1 7 "foo" 1 4))) ; Set the-list as the list
(do ((i the-list (rest i))) ; Initialize to the-list and set to rest on every loop
((null i)) ; Break condition
(print (first i)))) ; On every loop print list's first element

View file

@ -3,7 +3,7 @@ import extensions;
public program()
{
var things := new string[]{"Apple", "Banana", "Coconut"};
var things := new string[]::("Apple", "Banana", "Coconut");
things.forEach:(thing)
{

View file

@ -1,4 +1,4 @@
var a = [1, 2, 3, 4];
for(i in a)
Sys.println(i);
for (i in a)
Sys.println(i);

View file

@ -0,0 +1,6 @@
(for-each print '(1 3 4 2))
(print)
(for-each (lambda (a b c) (print a "-" b "/" c))
'(1 2 3 4)
'(5 6 7 8)
'(a b x z))

View file

@ -0,0 +1,9 @@
List<string> things = new List<string> ();
things.append("Apple");
things.append("Banana");
things.append("Coconut");
foreach (string thing in things)
{
stdout.printf("%s\n", thing);
}