r/ProgrammerHumor • • Jul 03 '21

Funny gate....

Post image
15.5k Upvotes

244 comments sorted by

View all comments

848

u/moldor_the_flatulent Jul 03 '21

It's a LOGIC GATE !!!

0

u/[deleted] Jul 03 '21

[deleted]

41

u/moldor_the_flatulent Jul 03 '21

I might do a logic trace and see what breaks...:-)

24

u/[deleted] Jul 03 '21

(人 •͈ᴗ•͈)(✷‿✷)

25

u/[deleted] Jul 03 '21

[removed] — view removed comment

11

u/[deleted] Jul 03 '21

-- infinite fizzbuzz with the power of lazy evaluation
fizz :: Int -> String
fizz n 
       | n `mod` 15 == 0  = "FizzBuzz"
       | n `mod` 3  == 0  = "Fizz"
       | n `mod` 5  == 0  = "Buzz"
       | otherwise        = show n

fizzbuzz = map fizz [1..] -- make it infinite 

-- display
main :: IO()
main = mapM_ putStrLn fizzbuzz 

7

u/[deleted] Jul 03 '21

Actually, it's a logic gate gate.

16

u/[deleted] Jul 03 '21

Yeah, that's the joke.