1 Old Syntactic Forms
2 Old Functions
On this page:
apply
open-input-file
open-output-file
open-input-output-file
with-input-from-file
with-output-to-file
call-with-input-file
call-with-output-file
syntax-object->datum
datum->syntax-object
module-identifier=?
module-transformer-identifier=?
module-template-identifier=?
module-label-identifier=?
free-identifier=?
make-namespace
namespace-transformer-require
transcript-on
transcript-off
hash-table?
make-hash-table
make-immutable-hash-table
Version: 4.0.2

 

2 Old Functions

(apply proc v ... lst)  any

  proc : procedure?

  v : any/c

  lst : list?

Like apply from scheme/base, but without support for keyword arguments.

(open-input-file file [mode])  input-port?

  file : path-string?

  mode : (one-of/c 'text 'binary) = 'binary

(open-output-file file [mode exists])  input-port?

  file : path-string?

  mode : (one-of/c 'text 'binary) = 'binary

  

exists

 

:

 

(one-of/c 'error 'append 'update

          'replace 'truncate 'truncate/replace)

 

 

 

=

 

'error

(open-input-output-file file [mode exists])

 

 

input-port?

 

output-port?

  file : path-string?

  mode : (one-of/c 'text 'binary) = 'binary

  

exists

 

:

 

(one-of/c 'error 'append 'update

          'replace 'truncate 'truncate/replace)

 

 

 

=

 

'error

(with-input-from-file file thunk [mode])  any

  file : path-string?

  thunk : (-> any)

  mode : (one-of/c 'text 'binary) = 'binary

(with-output-to-file file thunk [mode exists])  any

  file : path-string?

  thunk : (-> any)

  mode : (one-of/c 'text 'binary) = 'binary

  

exists

 

:

 

(one-of/c 'error 'append 'update

          'replace 'truncate 'truncate/replace)

 

 

 

=

 

'error

(call-with-input-file file proc [mode])  any

  file : path-string?

  proc : (input-port? -> any)

  mode : (one-of/c 'text 'binary) = 'binary

(call-with-output-file file proc [mode exists])  any

  file : path-string?

  proc : (output-port? -> any)

  mode : (one-of/c 'text 'binary) = 'binary

  

exists

 

:

 

(one-of/c 'error 'append 'update

          'replace 'truncate 'truncate/replace)

 

 

 

=

 

'error

Like open-input-file, etc. from scheme/base, but mode and exists arguments are not keyword arguments. When both mode and exists are accepted, they are accepted in either order.

(syntax-object->datum stx)  any

  stx : syntax?

(datum->syntax-object ctxt v srcloc [prop cert])  syntax?

  ctxt : (or/c syntax? false/c)

  v : any/c

  

srcloc

 

:

 

(or/c syntax? false/c

      (list/c any/c

              (or/c exact-positive-integer? false/c)

              (or/c exact-nonnegative-integer? false/c)

              (or/c exact-nonnegative-integer? false/c)

              (or/c exact-positive-integer? false/c))

      (vector/c any/c

                (or/c exact-positive-integer? false/c)

                (or/c exact-nonnegative-integer? false/c)

                (or/c exact-nonnegative-integer? false/c)

                (or/c exact-positive-integer? false/c)))

  prop : (or/c syntax? false/c) = #f

  cert : (or/c syntax? false/c) = #f

The same as syntax->datum and datum->syntax.

(module-identifier=? a-id b-id)  boolean?

  a-id : syntax?

  b-id : syntax?

(module-transformer-identifier=? a-id b-id)  boolean?

  a-id : syntax?

  b-id : syntax?

(module-template-identifier=? a-id b-id)  boolean?

  a-id : syntax?

  b-id : syntax?

(module-label-identifier=? a-id b-id)  boolean?

  a-id : syntax?

  b-id : syntax?

(free-identifier=? a-id b-id)  boolean?

  a-id : syntax?

  b-id : syntax?

The module-identifier=?, etc. functions are the same as free-identifier=?, etc. in scheme/base.

The free-identifier=? procedure returns

  (and (eq? (syntax-e a) (syntax-e b))

       (module-identifier=? a b))

(make-namespace [mode])  namespace?

  mode : (one-of/c 'initial 'empty) = 'initial

Creates a namespace with mzscheme attached. If the mode is empty, the namespace’s top-level environment is left empty. If mode is 'initial, then the namespace’s top-level environment is initialized with (namespace-require/copy 'mzscheme). See also make-base-empty-namespace.

(namespace-transformer-require req)  void?

  req : any/c

Equivalent to (namespace-require `(for-syntax ,req)).

(transcript-on filename)  any

  filename : any/c

(transcript-off)  any

Raises exn:fail, because the operations are not supported.

(hash-table? v flag ...)  hash-table?

  v : any/c

  flag : (one-of/c 'weak 'equal)

Returns #t if v like a hash table created by make-hash-table or make-immutable-hash-table with the given flags (or more), #f otherwise. Each provided flag must be distinct; if the second flag is redundant, the exn:fail:contract exception is raised.

(make-hash-table flag ...)  hash-table?

  flag : (one-of/c 'weak 'equal)

Creates and returns a new hash table. If provided, each flag must one of the following:

By default, key comparisons use eq?. If the second flag is redundant, the exn:fail:contract exception is raised.

(make-immutable-hash-table assocs flag ...)

  (and/c hash-table? immutable?)

  assocs : (listof pair?)

  flag : (one-of/c 'equal)

Like make-immutable-hash or make-immutable-hasheq, depending on whether an 'equal flag is provided.