Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
#APPTYPE CONSOLE
|
||||
|
||||
FOREACH DIM e IN MyMap(Add42, {1, 2, 3})
|
||||
PRINT e, " ";
|
||||
NEXT
|
||||
|
||||
PAUSE
|
||||
|
||||
FUNCTION MyMap(f, a)
|
||||
DIM ret[]
|
||||
FOREACH DIM e IN a
|
||||
ret[] = f(e)
|
||||
NEXT
|
||||
RETURN ret
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION Add42(n): RETURN n + 42: END FUNCTION
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#APPTYPE CONSOLE
|
||||
|
||||
DIM languages[] = {{"English", {"one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"}}, _
|
||||
{"French", {"un", "deux", "trois", "quatre", "cinq", "six", "sept", "huit", "neuf", "dix"}}}
|
||||
|
||||
MAP(SpeakALanguage, languages)
|
||||
|
||||
PAUSE
|
||||
|
||||
SUB NameANumber(lang, nb, number)
|
||||
PRINT "The number ", nb, " is called ", STRENC(number), " in ", lang
|
||||
END SUB
|
||||
|
||||
SUB SpeakALanguage(lang)
|
||||
MAP(NameANumber, lang[0], 1 TO 10, lang[1])
|
||||
PRINT LPAD("", 40, "-")
|
||||
END SUB
|
||||
Loading…
Add table
Add a link
Reference in a new issue