Remix.run Logo
gizmo686 a day ago

Haskell uses where in the sense the article describes.

E.g

   f x = y + 1
     where y = 2 * x
Haskell also has a "let" notation

    f x = let y = 2 * x
      in y + 1
> If a programming language wanted to use a keyword for restrictions that isn’t “where” (and still is a single word, hence “such that” doesn’t qualify), what word would be suitable instead? “With”? “Having”?

If? Python does so with it's list comprehensions:

  [ x for x in range(100) if x % 2 == 0 ]