procedure?(3scm)

πŸ“¦ version 0-unstable-2024-02, in nixpkgs unstable

πŸ’– 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