Skip to main content

arithmser

arithmser(
@start ? ## required
@end ? ## required
@step 1
@maxcount 0
) -> llll/null
note

arithmser is a built-in function in the bell programming language and is not unique or exclusive to bellplay~.

Returns an arithmetic series, understood as a list of evenly spaced numeric values. If one of the arguments is set to null, its value is automatically inferred from the other arguments.


Arguments

  • @start [llll/null] (required)
  • @end [llll/null] (required)
  • @step [int] (default: 1)
  • @maxcount [llll] (default: 0)

Output

Arithmetic series. [llll/null]

warning

arithmser will return null without raising an error if required arguments are not provided.


Usage

arithmser(0, 10, 1); ## 1...10
arithmser(0, 10, null, 3); ## 0 5 10
arithmser(0, null, 2, 4); ## 0 2 4 6
arithmser(null, 10, 2, 4) ## 4 6 8 10