{"size": 1886, "ext": "scrbl", "max_stars_repo_path": "share/pkgs/compatibility-doc/mzlib/scribblings/list.scrbl", "max_stars_repo_name": "takikawa/racket-ppa", "max_stars_repo_stars_event_min_datetime": "2018-07-29T04:13:52.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-14T16:11:17.000Z", "max_issues_repo_path": "compatibility-doc/mzlib/scribblings/list.scrbl", "max_issues_repo_name": "NoahStoryM/compatibility", "max_issues_repo_issues_event_min_datetime": "2017-08-25T20:26:37.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T17:48:40.000Z", "max_forks_repo_path": "compatibility-doc/mzlib/scribblings/list.scrbl", "max_forks_repo_name": "NoahStoryM/compatibility", "max_forks_repo_forks_event_min_datetime": "2015-03-09T12:20:01.000Z", "max_forks_repo_forks_event_max_datetime": "2021-10-09T05:02:56.000Z"}
{"max_stars_count": 10, "max_issues_count": 15, "max_forks_count": 8, "avg_line_length": 24.1794871795, "max_line_length": 72, "alphanum_fraction": 0.6484623542}
#lang scribble/doc
@(require "common.rkt"
          (for-label mzlib/list))

@mzlib[#:mode title list]

@deprecated[@racketmodname[racket/list]]{}

The @racketmodname[mzlib/list] library re-exports several functions
from @racketmodname[scheme/base] and @racketmodname[scheme/list]:

@racketblock[
cons?
empty?
empty
foldl
foldr
remv
remq
remove
remv*
remq*
remove*
findf
memf
assf
filter
sort
]

@deftogether[(
@defproc[(first [v pair?]) any/c]
@defproc[(second [v (and/c pair? ....)]) any/c]
@defproc[(third [v (and/c pair? ....)]) any/c]
@defproc[(fourth [v (and/c pair? ....)]) any/c]
@defproc[(fifth [v (and/c pair? ....)]) any/c]
@defproc[(sixth [v (and/c pair? ....)]) any/c]
@defproc[(seventh [v (and/c pair? ....)]) any/c]
@defproc[(eighth [v (and/c pair? ....)]) any/c]
)]{

Accesses the first, second, @|etc| elment of ``list'' @racket[v]. The
argument need not actually be a list; it is inspected only as far as
necessary to obtain an element (unlike the same-named functions from
@racketmodname[scheme/list], which do require the argument to be a
list).}


@defproc[(rest [v pair?]) any/c]{

The same as @racket[cdr].}


@defproc[(last-pair [v pair?]) pair?]{

Returns the last pair in @racket[v], raising an error if @racket[v] is
not a pair (but @racket[v] does not have to be a proper list).}



@defproc[(merge-sorted-lists [lst1 list?][lst2 lst?]
                             [less-than? (any/c any/c . -> . any/c)])
         list?]{

Merges the two sorted input lists, creating a new sorted list.  The
merged result is stable: equal items in both lists stay in the same
order, and these in @racket[lst1] precede @racket[lst2].}

@defproc[(mergesort [lst list?] [less-than? (any/c any/c . -> . any/c)])
         list?]{

The same as @racket[sort].}

@defproc[(quicksort [lst list?] [less-than? (any/c any/c . -> . any/c)])
         list?]{

The same as @racket[sort].}
