procedure?(3scm)
π NAME π
hey bestie, welcome to procedure? from the Scheme Programmer's Manual β section 3scm. This is the little test that asks the iconic question: is this object, like, actually a procedure? π¦
π LIBRARY π
okay so you can get this from a few different places, depending on your import vibe:
(import (rnrs)) ;R6RS
(import (rnrs base)) ;R6RS
(import (scheme r5rs)) ;R7RS
(import (scheme base)) ;R7RS
β¨ SYNOPSIS β¨
(procedure? obj)
π¦ DESCRIPTION π¦
Returns #t if obj is a procedure, otherwise returns #f. Literally that's the whole vibe check β no cap. π
π RETURN VALUES π
Returns a single boolean object as per the description. Just one boolean, bestie β it's giving simple and clean. β¨
πΈ EXAMPLES πΈ
(procedure? 'car) => #f
(procedure? (lambda (x) (* x x)))
=> #t
(procedure? '(lambda (x) (* x x)))
=> #f
π ERRORS π
This procedure can raise exceptions with the following condition types:
&assertion(R6RS) β the wrong number of arguments was passed. π- R7RS β the assertions described above are errors. Implementations may signal an error, extend the procedure's domain of definition to include such arguments, or fail catastrophically. fail catastrophically is right there in the text, so yeah, it can get dramatic. π
β STANDARDS β
R4RS, IEEE Scheme, R5RS, R6RS, R7RS. certified across the standards, periodt π
π AUTHORS π
This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://github.com/schemedoc/manpages/. π«Ά
π source/version: Scheme Programmer's Manual, procedure?(3scm) β date: 2021-01-17. byeee bestie, go check those procedures π
π¦ where this page comes from
- nixpkgs unstable: scheme-manpages 0-unstable-2024-02-11
- π the page's license: MIT
- Copyright (c) 2021 Gwen Weinholt
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms