News for hackers. Stuff that matters.
Re:I'm Not Mutable, I'm Partially Instantiated (Prolog) by whateveracct on Thursday November 07, 2024 @01:01PM (#42079115)
Technically, Haskell laziness is just mutability under the hood :)

And the "difference list" mentioned in the article is also in Haskell - although framed differently (more "functionally")

    type DList a = [a] -> [a]

    concat :: DList a -> DList a -> DList a
    concat = (.)

    toList :: DList a -> [a]
    toList d = d []

    fromList :: [a] -> DList a
    fromList = (++)

There are no comments on this comment yet.