square(3scm)

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

πŸ’… square πŸ’…

okay bestie, welcome to the square(3scm) page from the Scheme Programmer's Manual β€” manual name folded in near the top, exactly as requested, we're doing this cute style now. πŸ’–

✨ NAME ✨

square β€” multiply a number by itself. periodt. πŸŽ€

πŸ“š LIBRARY πŸ“š

(import (scheme base))              ;R7RS

πŸ¦‹ SYNOPSIS πŸ¦‹

(square z)

🌸 DESCRIPTION 🌸

Returns the square of z. This is equivalent to (* z z). ngl, that's the whole plot. ✨

πŸ’– RETURN VALUES πŸ’–

Returns a single value which is a number. one number, one value, main character energy fr fr. πŸ‘‘

πŸ”₯ EXAMPLES πŸ”₯

(square 42)  => 1764
(square 2.0) => 4.0

🌈 COMPATIBILITY 🌈

Only exists in R7RS. Can be replaced with (lambda (z) (* z z)). so if you're on an older vibe, that lambda is your bestie. it's giving backup plan, and I'm obsessed. 🫢

πŸ’€ ERRORS πŸ’€

It is an error for this procedure to be passed the wrong number of arguments, and it is an error if z is not a complex number object. Implementations may signal an error, extend the procedure's domain of definition to include such arguments, or fail catastrophically. fail catastrophically is not a drill, bestie β€” that's literally what the page says. 😭

πŸ‘€ SEE ALSO πŸ‘€

⭐ STANDARDS ⭐

R7RS. iykyk. ⭐

🧚 HISTORY 🧚

The square procedure first appears in R7RS.

πŸŽ€ 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/.


okay that's the whole page, mwah πŸ’‹ β€” source/version: Scheme Programmer's Manual / square(3scm), dated 2022-04-05. πŸ¦‹

πŸ“¦ where this page comes from