mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-11 04:27:55 +03:00
strings work too!
This commit is contained in:
parent
e9caac1429
commit
0464ea300a
@ -136,4 +136,13 @@
|
||||
(defn mapping-floats []
|
||||
(map x2f [10.0 20.0 30.0 40.0 50.0]))
|
||||
|
||||
(defn x2s [s]
|
||||
(itos (strlen (ref s))))
|
||||
|
||||
(defn exclaim (s)
|
||||
(string-append (ref s) "!"))
|
||||
|
||||
(defn mapping-strings []
|
||||
(map exclaim [(string-copy "hej") (string-copy "san") (string-copy "svej") (string-copy "san")]))
|
||||
|
||||
;;(bake mapping)
|
||||
|
Loading…
Reference in New Issue
Block a user