primes :: (Integral a) => [a]
primes = 2 : ([3, 5 ..] & filter (not . has_divisor))
 where
  has_divisor n =
    any ((0 ==) . (n `mod`) . fst) $ takeWhile ((n >=) . snd) primes_with_square
  primes_with_square :: (Integral a) => [(a, a)]
  primes_with_square = [(p, p * p) | p <- primes]

euler project 문제 풀다가..

1

If you have a fediverse account, you can quote this note from your own instance. Search https://hackers.pub/ap/notes/019b1662-a5c1-725c-9a17-9e4d3c6ac428 on your instance and quote it. (Note that quoting is not supported in Mastodon.)