{"size": 749, "ext": "scrbl", "max_stars_repo_path": "cur-doc/cur/scribblings/stdlib/maybe.scrbl", "max_stars_repo_name": "jsmaniac/cur", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "cur-doc/cur/scribblings/stdlib/maybe.scrbl", "max_issues_repo_name": "jsmaniac/cur", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "cur-doc/cur/scribblings/stdlib/maybe.scrbl", "max_forks_repo_name": "jsmaniac/cur", "max_forks_repo_forks_event_min_datetime": "2021-10-02T16:05:54.000Z", "max_forks_repo_forks_event_max_datetime": "2021-10-02T16:05:54.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 27.7407407407, "max_line_length": 124, "alphanum_fraction": 0.6702269693}
#lang scribble/manual

@(require
  "../defs.rkt"
  scribble/eval)

@(define curnel-eval (curnel-sandbox "(require cur/stdlib/bool cur/stdlib/maybe cur/stdlib/sugar)"))

@title{Maybe}
@defmodule[cur/stdlib/maybe]
This library defines the datatype @racket[Maybe] and several forms for using them.

@; TODO: Define a @defdata macro for Cur
@deftogether[(@defthing[Maybe (∀ (A : Type) Type)]
              @defthing[none (∀ (A : Type) (Maybe A))]
	      @defthing[some (∀ (A : Type) (a : A) (Maybe A))])]{
The maybe datatype.
}

@defform[(some/i a)]{
A syntactic form for @racket[some] that attempts to infer the type of the expression @racket[a] to reduce annotation burden.

@examples[#:eval curnel-eval
          (some Bool true)
	  (some/i true)]
}
