Skip to content

Commit

Permalink
Added Pinecone.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Mackenzie-Websdale committed May 21, 2017
1 parent 08e5c3d commit 602f50d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pinecone.pn
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# FizzBuzz

# call the function defined below
fizzBuzz: 1, 100

# define the FizzBuzz function
fizzBuzz :: {start: Int, end: Int}: (

# loop i from start to end
i: in.start | i <= in.end | i: i+1 @ (

# use conditionals to print the right thing

i % 3 = 0 && i % 5 = 0 ?
print: "FizzBuzz"
|
i % 3 = 0 ?
print: "Fizz"
|
i % 5 = 0 ?
print: "Buzz"
|
print: i
)
)

0 comments on commit 602f50d

Please sign in to comment.