Skip to content

Instantly share code, notes, and snippets.

@ryu1-1uyr
Created May 25, 2018 00:44
Show Gist options
  • Save ryu1-1uyr/bc2b6e6ddb0950f0ff340e1523a1e6a9 to your computer and use it in GitHub Desktop.
Save ryu1-1uyr/bc2b6e6ddb0950f0ff340e1523a1e6a9 to your computer and use it in GitHub Desktop.
引き渡し型で書いたつもり!!!!こういう感じで合ってるのだろうか
const p = console.log
const TF = x => x%3==0 ? x%5 == 0?p("Fizz Buzz"):p("fizz"):x%5==0?p("Buzz"):p(x)
const loop = x => y => f =>{
f(x)
x < y ? loop(x+1)(y)(f):" "
}
loop(1)(31)(TF)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment