Login
You're viewing the functional.cafe public feed.
  • Nov 2, 2026, 8:55 PM

    a couple of interesting things I've found in the #Miranda programming language today:

    diagonalized list comprehension syntax [//]:

    > take 10 [ (a, b) // a <- [1..] ; b <- [a..] ]
    [(1,1),(1,2),(2,2),(1,3),(2,3),(3,3),(1,4),(2,4),(3,4),(4,4)]

    parameterized scripts: script declares %free identifiers with types, %include binds them to identifiers defined in including script (the manual uses an example of element-type-agnostic matrix calculation library, that gets number type passed in from outside).

    💬 0🔄 0⭐ 0