YoshikuniJujo on Nostr: https://www.reddit.com/r/haskell/comments/2cum9p/i_did_a_haskell_fizzbuzz/ ...
https://www.reddit.com/r/haskell/comments/2cum9p/i_did_a_haskell_fizzbuzz/
きれいなFizzBuzzみつけた。
モノイドをうまく使ってる。
たぶん
instance Monoid a => Monoid (Maybe a) where
Just a <> Just b = Just (a <> b)
Just a <> Nothing = Just a
Nothing <> Just b = Just b
_ <> _ = Nothing
的に定義されているのをうまく使っている。
きれいなFizzBuzzみつけた。
モノイドをうまく使ってる。
たぶん
instance Monoid a => Monoid (Maybe a) where
Just a <> Just b = Just (a <> b)
Just a <> Nothing = Just a
Nothing <> Just b = Just b
_ <> _ = Nothing
的に定義されているのをうまく使っている。