BlaF

Members
  • Content count

    0
  • Joined

  • Last visited

Community Reputation

123 Neutral

About BlaF

  • Rank
    Newbie
  1. I'm no fluent haskeller yet, but I would have wrote the banana function with a let construct instead of the recursive call to self: banana goid = let b = GameObject { goID = goid , render = printf "banana: id %d\n" goid , update = b } in b for the first updatable instance, and for the second: banana goid = let b = GameObject { goID = goid , render = printf "banana: id %d\n" goid , update = const $ b } in b For what I understood (why recursive let make space efficient, Tying the Knot), this gives a truly "identical banana" each time update is called instead of a chunk that yields a similar banana.