On 2015-06-23 17:19:56 +0800, Nala Ginrut wrote:
> On Tue, 2015-06-23 at 11:12 +0200, to...@tuxteam.de wrote:
>> What does number/base do? Does it change the read syntax of numbers?
>> 
>
> I think it defines a function (number/base base) first, then use it as
> argument of the outer function...
>
> http://docs.racket-lang.org/reference/define.html
>

How is this syntax macro style improve on a more direct and simple
standard scheme implementation of:

(define (number/base base)
  (lambda (lst)
    (let loop ((digits lst)
               (accumulator 0))
      (if (null? digits)
          accumulator
          (loop (cdr digits)
                (+ (car digits) (* accumulator base)))))))

This amalgam of 'match' and 'define-syntax's style '...', and
'destructuring-bind' syntax just seems to add complexity to a language
whose prime benefit is the clarity of its explicitness and lack of
syntax.

--
Barry Fishman


Reply via email to