Merging in mzlib/contract scribble changes.
svn: r11742
This commit is contained in:
commit
f12b9fca59
|
@ -5,8 +5,9 @@
|
||||||
|
|
||||||
@(define-syntax-rule (twocolumns id ...)
|
@(define-syntax-rule (twocolumns id ...)
|
||||||
(*twocolumns (list (scheme id) ...)))
|
(*twocolumns (list (scheme id) ...)))
|
||||||
@(define (*twocolumns l)
|
@(define (*twocolumns uneven-l)
|
||||||
(let* ([len (length l)]
|
(let* ([l (if (zero? (modulo (length uneven-l) 2)) uneven-l (append uneven-l (list #f)))]
|
||||||
|
[len (length l)]
|
||||||
[half (quotient len 2)]
|
[half (quotient len 2)]
|
||||||
[a (for/list ([i (in-range half)]
|
[a (for/list ([i (in-range half)]
|
||||||
[e l])
|
[e l])
|
||||||
|
@ -17,13 +18,21 @@
|
||||||
(make-table #f
|
(make-table #f
|
||||||
(map (lambda (a b)
|
(map (lambda (a b)
|
||||||
(list (to-flow spacer)
|
(list (to-flow spacer)
|
||||||
(to-flow a)
|
(to-flow a)
|
||||||
(to-flow spacer)
|
(to-flow spacer)
|
||||||
(to-flow b)))
|
(to-flow (or b ""))))
|
||||||
a b))))
|
a b))))
|
||||||
|
|
||||||
@mzlib[#:mode title contract]
|
@mzlib[#:mode title contract]
|
||||||
|
|
||||||
|
This library is designed as a backwards compatible library
|
||||||
|
for old uses of contracts. It should not be used for new
|
||||||
|
libraries; use @schememodname[scheme/contract] instead.
|
||||||
|
|
||||||
|
The main differences: the function contract syntax is more
|
||||||
|
regular and function contracts now support keywords, and
|
||||||
|
@tt{union} is now @scheme[or/c].
|
||||||
|
|
||||||
The @schememodname[mzlib/contract] library re-exports many bindings
|
The @schememodname[mzlib/contract] library re-exports many bindings
|
||||||
from @schememodname[scheme/contract]:
|
from @schememodname[scheme/contract]:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user