~jojo/Carth

adac674d6d227a5cd5aa9468946b0f789e90ce10 — JoJo 4 months ago 3b91c3f
std: add TODO comment
1 files changed, 5 insertions(+), 0 deletions(-)

M std/iter.carth
M std/iter.carth => std/iter.carth +5 -0
@@ 1,6 1,11 @@
(import macros)
(import maybe)

;; TODO: Iter could include a lazy length field. By default, it's a lazy computation
;;       counting the number of nodes in the list, but if you know the length ahead of
;;       time, like when creating an iterator for an array, the iterator could be
;;       constructed with a constructor function that initializes the length to a non-lazy
;;       constant.
(data (Iter a)
  (Iter (Fun Unit (Maybe [a (Iter a)]))))