|
From: | Panicz Maciej Godek |
Subject: | Re: srfi-1 take and drop seriously broken |
Date: | Mon, 21 Nov 2016 11:21:24 +0100 |
Ok. Apart from the fact that it's written in srfi, I wonder what the
reasoning for such behavior is. I mean, what makes the "i" bigger than
the length of the list so illegal that you have to bail out? When is
such behavior useful? On the other hand, not having to worry about the
list length is very useful. Because now my code is littered with
things like
;; Let's hope that string-length is O(1).
(if (>= width (string-length item))
item
(string-take item width))
or
(if (string-null? text)
""
(string-drop-right text 1))
Maybe I'm just doing something wrong?
[Prev in Thread] | Current Thread | [Next in Thread] |