add int?
This commit is contained in:
parent
fe029573cf
commit
6ca5c9ae48
|
@ -1047,6 +1047,11 @@ fn round {
|
||||||
(n as :number) -> base :round (n)
|
(n as :number) -> base :round (n)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn int? {
|
||||||
|
"Tells if a number is an integer."
|
||||||
|
(n as :number) -> eq? (n, floor (n))
|
||||||
|
}
|
||||||
|
|
||||||
fn range {
|
fn range {
|
||||||
"Returns the set of integers between start (inclusive) and end (exclusive) as a list: [start, end). With one argument, starts at 0. If end is less than start, returns an empty list."
|
"Returns the set of integers between start (inclusive) and end (exclusive) as a list: [start, end). With one argument, starts at 0. If end is less than start, returns an empty list."
|
||||||
(end as :number) -> base :range (0, end)
|
(end as :number) -> base :range (0, end)
|
||||||
|
@ -1386,6 +1391,7 @@ pkg Prelude {
|
||||||
hideturtle! & turtles
|
hideturtle! & turtles
|
||||||
home! & turtles
|
home! & turtles
|
||||||
inc & math
|
inc & math
|
||||||
|
int? & math
|
||||||
inv & math
|
inv & math
|
||||||
inv/0 & math
|
inv/0 & math
|
||||||
inv/safe & math
|
inv/safe & math
|
||||||
|
|
Loading…
Reference in New Issue
Block a user