YAPC::EU 2018 Glasgow Update!

This commit is contained in:
Ingy döt Net 2018-08-17 15:15:24 +01:00
parent 22f33d4004
commit 4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions

View file

@ -0,0 +1,3 @@
{"one": 1, "two": "bad"}
( swap . space . cr )
m:each

View file

@ -0,0 +1,3 @@
{"one": 1, "two": "bad"} m:keys
( . cr )
a:each

View file

@ -1,7 +1,4 @@
;; Project : Associative array/Iteration
;; Date : 2018/03/08
;; Author : Gal Zsolt [~ CalmoSoft ~]
;; Email : <calmosoft@gmail.com>
(setf x (make-array '(3 2)
:initial-contents '(("hello" 13 ) ("world" 31) ("!" 71))))

View file

@ -2,7 +2,7 @@ import system'collections.
import system'routines.
import extensions.
public program =
public program
[
// 1. Create
var aMap := Dictionary new.
@ -15,4 +15,4 @@ public program =
// Enumerate
aMap forEach
(:aKeyValue)[ console printLine(aKeyValue key," : ",aKeyValue value) ].
].
]

View file

@ -0,0 +1,18 @@
import system'collections.
import system'routines.
import extensions.
public program
[
// 1. Create
auto aMap := Map<literal,literal>().
aMap["key"] := "foox".
aMap["key"] := "foo".
aMap["key2"]:= "foo2".
aMap["key3"]:= "foo3".
aMap["key4"]:= "foo4".
// Enumerate
aMap forEach
(:tuple)[ console printLine(tuple item1," : ",tuple item2) ].
]

View file

@ -1,7 +1,4 @@
# Project : Associative array/Iteration
# Date : 2017/10/22
# Author : Gal Zsolt (~ CalmoSoft ~)
# Email : <calmosoft@gmail.com>
lst = [["hello", 13], ["world", 31], ["!", 71]]
for n = 1 to len(lst)