Created
June 15, 2011 04:01
-
-
Save rodrigovidal/1026449 to your computer and use it in GitHub Desktop.
Soma de uma lista usando Pipe-Forward F#
This file contains 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
let isMultipleOf3Or5 x = x % 3 = 0 || x % 5 = 0 | |
let sumAllMultiplesOf3Or5Ref list = | |
list |> List.filter isMultipleOf3Or5 | |
|> List.sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment