mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-11 04:27:55 +03:00
mapping floats
This commit is contained in:
parent
4b3e94aff8
commit
e9caac1429
@ -127,7 +127,13 @@
|
||||
(defn x2 [x]
|
||||
(* x 2))
|
||||
|
||||
(defn x2f [x]
|
||||
(* x 2.0))
|
||||
|
||||
(defn mapping []
|
||||
(map x2 [1 2 3 4 5]))
|
||||
|
||||
(defn mapping-floats []
|
||||
(map x2f [10.0 20.0 30.0 40.0 50.0]))
|
||||
|
||||
;;(bake mapping)
|
||||
|
Loading…
Reference in New Issue
Block a user