1

Forgive my ignorance, but what is the difference between these two:

(define blah)
(define* blah)

? Unfortunately Google ignores the asterisks character.

Matthew
  • 11,203
  • 9
  • 38
  • 44

3 Answers3

1

SRFI 89 was written by Gambit's author, so it's only fair to assume that Gambit's define* does what that document says. :-)

In other words, it's syntactic sugar over lambda* (as described in SRFI 89) rather than lambda.

C. K. Young
  • 219,335
  • 46
  • 382
  • 435
0

In the (rather extensive) documentation of Gambit Scheme there is no mention of a define* special form; it might be some procedure, definition, macro or special form found only in the piece of code where you saw it. You should post a link referencing the source of the code where define* is being used.

Óscar López
  • 232,561
  • 37
  • 312
  • 386
0

A little more context for the question would be nice.

Sometimes the * just means that the form does something extra. My guess is therefore that define* works as ordinary define, but at the same time does something extra. This extra could be automatically exporting the name from a module.

This definition was found in the Racket ffi-lib illustrates this principle:

(define-syntax define*
  (syntax-rules ()
    [(_ (name . args) body ...)
     (begin (provide name) (define (name . args) body ...))]
    [(_ name expr)
     (begin (provide name) (define name expr))]))
soegaard
  • 30,661
  • 4
  • 57
  • 106