mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
fix: #442
This commit is contained in:
parent
4dff4746b8
commit
9308a910ca
8 changed files with 140 additions and 68 deletions
|
@ -3,12 +3,12 @@
|
|||
.randrange!: (start: Int, stop := Int, step := Int) => Int
|
||||
.randint!: (a: Int, b: Int) => Int
|
||||
.getrandbits!: (k: Nat) => Nat
|
||||
.choice!: |T: Type, S <: Sequence(T)|(seq: S) => T
|
||||
.choice!: |T: Type|(seq: Sequence(T)) => T
|
||||
# TODO: dependent length array type
|
||||
.choices!: |T: Type, S <: Sequence(T)|(population: S, weights := [Nat; _] or NoneType, k := Nat) => [T; _]
|
||||
.choices!: |T: Type|(population: Sequence(T), weights := [Nat; _] or NoneType, k := Nat) => [T; _]
|
||||
# TODO: Sequence!
|
||||
.shuffle!: |T: Type, S <: Sequence(T)|(seq: S) => NoneType
|
||||
.sample!: |T: Type, S <: Sequence(T)|(population: S, k := Nat) => [T; _]
|
||||
.shuffle!: |T: Type|(seq: Sequence(T)) => NoneType
|
||||
.sample!: |T: Type|(population: Sequence(T), k := Nat) => [T; _]
|
||||
.random!: () => 0.0..1.0 # TODO: <1.0
|
||||
.dep_uniform! = 'uniform': |A: Int, B: Int|(a: {A}, b: {B}) => A..B
|
||||
.uniform!: (a: Int, b: Int) => Int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue