Last active
November 4, 2016 15:18
-
-
Save vapidbabble/277ac0fe8d14e33f7c2947e5c6f2135d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. | |
function=lambda{|x| Math.sin(x)} | |
(1..50).to_a.shuffle.take(5).map {|x| function[x]} | |
2. | |
function=fn(x)-> :math.sin(x) end | |
(1..50) |> Enum.take_random(5) |> Enum.map function | |
3. | |
(def function(fn [ele] (Math/sin ele)) ) | |
(map (fn [ele] (function ele)) (take 5 (shuffle (range 1 50))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment