# Package com.mysidia.kttalk

## Types

Block
Link copied to clipboard
typealias Block = () -> Unit
Closure
Link copied to clipboard
typealias Closure = () -> Any?
Predicate
Link copied to clipboard
typealias Predicate = () -> Boolean

## Functions

abs
Link copied to clipboard
fun Int.abs(): Int
computes the absolute value of the receiver integer.
fun Long.abs(): Long
computes the absolute value of the receiver integer.
fun Number.abs(): Double
computes the absolute value of the receiver number.
arcCos
Link copied to clipboard
fun Number.arcCos(): Double
computes the arc cosine value of the receiver number.
arcCosh
Link copied to clipboard
fun Number.arcCosh(): Double
computes the arc hyperbolic cosine value of the receiver number.
arcSin
Link copied to clipboard
fun Number.arcSin(): Double
computes the arc sine value of the receiver number.
arcSinh
Link copied to clipboard
fun Number.arcSinh(): Double
computes the arc hyperbolic sine value of the receiver number.
arcTan
Link copied to clipboard
fun Number.arcTan(): Double
computes the arc tangent value of the receiver number.
fun Number.arcTan(that: Number): Double
computes the arc tangent value between two numbers.
arcTanh
Link copied to clipboard
fun Number.arcTanh(): Double
computes the arc hyperbolic tangent value of the receiver number.
ceil
Link copied to clipboard
fun Number.ceil(): Double
rounds to the next integer value greater than this receiver number.
cos
Link copied to clipboard
fun Number.cos(): Double
computes the cosine value of the receiver number.
cosh
Link copied to clipboard
fun Number.cosh(): Double
computes the hyperbolic cosine value of the receiver number.
downTo
Link copied to clipboard
inline fun Int.downTo(that: Int, lambda: (Int) -> Unit)
evaluates the supplied lambda block with the cursor starting at the receiver integer until it reaches the ending integer, step size is -1.
inline fun Long.downTo(that: Long, lambda: (Long) -> Unit)
evaluates the supplied lambda block with the cursor starting at the receiver integer until it reaches the ending integer, step size is -1.
ensure
Link copied to clipboard
infix inline fun Closure.ensure(code: Block): Any?
evaluates the supplied code block regardless of whether the receiver closure executes successfully.
infix inline fun Block.ensure(code: Block)
evaluates the supplied code block regardless of whether the receiver block executes successfully.
even
Link copied to clipboard
fun Int.even(): Boolean
checks if the receiver integer is even number.
fun Long.even(): Boolean
checks if the receiver integer is even number.
exp
Link copied to clipboard
fun Number.exp(): Double
computes the value of exp(x) where x is this receiver number.
factorial
Link copied to clipboard
fun Int.factorial(): Int
computes the factorial of the receiver integer.
fun Long.factorial(): Long
computes the factorial of the receiver integer.
floor
Link copied to clipboard
fun Number.floor(): Double
rounds to the next integer value less than this receiver number.
gcd
Link copied to clipboard
fun Int.gcd(that: Int): Int
finds the greatest common divisor of two integers.
fun Int.gcd(that: Long): Long
finds the greatest common divisor of two integers.
fun Long.gcd(that: Int): Long
finds the greatest common divisor of two integers.
fun Long.gcd(that: Long): Long
finds the greatest common divisor of two integers.
hypot
Link copied to clipboard
fun Number.hypot(that: Number): Double
computes the square root of the square of this receiver number with another number.
ifCurtailed
Link copied to clipboard
infix inline fun Closure.ifCurtailed(code: Block): Any?
evaluates the supplied code block if the receiver closure execution fails with error/exception.
infix inline fun Block.ifCurtailed(code: Block)
evaluates the supplied code block if the receiver block execution fails with error/exception.
ifFalse
Link copied to clipboard
infix inline fun Boolean.ifFalse(block: Block)
evaluates a block if the receiver is boolean false value, this is smalltalk's way of unless statement.
inline fun Boolean.ifFalse(block: Block, ifTrue: Block)
evaluates first block if the receiver is boolean false value, otherwise evaluates the second block, this is smalltalk's way of unless...else statement.
ifNotNull
Link copied to clipboard
infix inline fun Any?.ifNotNull(block: Block)
evaluates a block if the receiver object is not null.
inline fun Any?.ifNotNull(block: Block, otherwise: Block)
evaluates first block if receiver object is not null, otherwise evaluates the second block.
ifNull
Link copied to clipboard
infix inline fun Any?.ifNull(block: Block)
evaluates a block if the receiver object is null.
inline fun Any?.ifNull(block: Block, otherwise: Block)
evaluates first block if receiver object is null, otherwise evaluates the second block.
ifTrue
Link copied to clipboard
infix inline fun Boolean.ifTrue(block: Block)
evaluates a block if the receiver is boolean true value, this is smalltalk's way of if statement.
inline fun Boolean.ifTrue(block: Block, ifFalse: Block)
evaluates first block if the receiver is boolean true value, otherwise evaluates the second block, this is smalltalk's way of if...else statement.
isNull
Link copied to clipboard
fun Any?.isNull(): Boolean
checks if the receiver object is null.
lcm
Link copied to clipboard
fun Int.lcm(that: Int): Int
finds the least common multiple of two integers.
fun Int.lcm(that: Long): Long
finds the least common multiple of two integers.
fun Long.lcm(that: Int): Long
finds the least common multiple of two integers.
fun Long.lcm(that: Long): Long
finds the least common multiple of two integers.
ln
Link copied to clipboard
fun Number.ln(): Double
computes the value of ln(x) where x is this receiver number.
log
Link copied to clipboard
fun Number.log(): Double
computes the value of log(x) where x is this receiver number.
fun Number.log(base: Number): Double
computes the value of log(x) where x is this receiver number, with supplied argument as base.
odd
Link copied to clipboard
fun Int.odd(): Boolean
checks if the receiver integer is odd number.
fun Long.odd(): Boolean
checks if the receiver integer is odd number.
on
Link copied to clipboard
inline fun <T : Throwable> Closure.on(code: (T) -> Unit): Any?
evaluates the supplied code block if the receiver block execution throws an exception of type T.
inline fun <T : Throwable> Block.on(code: (T) -> Unit)
evaluates the supplied code block if the receiver block execution throws an exception of type T.
inline fun <T : Throwable> Closure.on(code: (T) -> Unit, ensure: Block): Any?
evaluates the supplied code block if the receiver closure execution throws an exception of type T, and always evaluates the second code block.
inline fun <T : Throwable> Block.on(code: (T) -> Unit, ensure: Block)
evaluates the supplied code block if the receiver block execution throws an exception of type T, and always evaluates the second code block.
reciprocal
Link copied to clipboard
fun Number.reciprocal(): Double
computes the reciprocal value of this receiver number.
round
Link copied to clipboard
fun Number.round(): Double
rounds the receiver number to the nearest integer.
fun Number.round(numDigits: Int): Double
rounds the receiver number to the supplied number of digits.
sin
Link copied to clipboard
fun Number.sin(): Double
computes the sine value of this receiver number.
sinh
Link copied to clipboard
fun Number.sinh(): Double
computes the hyperbolic sine value of this receiver number.
sqrt
Link copied to clipboard
fun Number.sqrt(): Double
computes the square root of this receiver number.
squared
Link copied to clipboard
fun Number.squared(): Double
computes the square of this receiver number.
step
Link copied to clipboard
fun Number.step(to: Number, lambda: (Number) -> Unit)
evaluates the supplied lambda block with the cursor starting at the receiver number, until it reaches the ending number.
inline fun Number.step(to: Number, step: Number, lambda: (Number) -> Unit)
evaluates the supplied lambda block with the cursor starting at the receiver number, until it reaches the ending number.
tan
Link copied to clipboard
fun Number.tan(): Double
computes the tangent value of this receiver number.
tanh
Link copied to clipboard
fun Number.tanh(): Double
computes the hyperbolic tangent value of this receiver number.
timesRepeat
Link copied to clipboard
infix inline fun Int.timesRepeat(lambda: (Int) -> Unit)
evaluates the supplied lambda block as many times as the receiver integer.
infix inline fun Long.timesRepeat(lambda: (Long) -> Unit)
evaluates the supplied lambda block as many times as the receiver integer.
upTo
Link copied to clipboard
inline fun Int.upTo(that: Int, lambda: (Int) -> Unit)
evaluates the supplied lambda block with the cursor starting at the receiver integer until it reaches the ending integer, step size is 1.
inline fun Long.upTo(that: Long, lambda: (Long) -> Unit)
evaluates the supplied lambda block with the cursor starting at the receiver integer until it reaches the ending integer, step size is 1.
whileFalse
Link copied to clipboard
infix inline fun Predicate.whileFalse(code: Block)
evaluates the supplied code block as long as the receiver predicate evaluates to false.
whileTrue
Link copied to clipboard
infix inline fun Predicate.whileTrue(code: Block)
evaluates the supplied code block as long as the receiver predicate evaluates to true.