Sidef::Types::Array::Array
This class implements ...
var obj = Array(...)
Inherits methods from:
* Sidef::Object::Object
a & b
Returns the intersection of two arrays.
<a a a b c> & <a x y a c> #=> ["a", "a", "c"]
Aliases: and
a * n
Repeats the content of array a n times, returning a new array.
a
<a b> * 2 #=> ["a", "b", "a", "b"]
Aliases: mul
a ** n
Matrix exponentiation, excpecting array a to be a 2D array.
var A = [[1, 2, 0], [0, 3, 1], [1, 0, 0]] say A**5 #=> [[37, 274, 84], [42, 311, 95], [11, 84, 26]]
Aliases: mpow, matrix_pow
a + b
Array concatenation, returning a new array.
<a b> + <c d> #=> ["a", "b", "c", "d"]
Aliases: add, concat
a - b
Array difference: removes any element from array a that exists inside array b, returning a new array.
b
<a a a b c> - <a x y a c> #=> ["a", "b"]
Aliases: sub, diff
a...
Converts array a into a list.
var (a,b,c) = <1 2 3>...
Aliases: to_list
a / n
Divides the array a into n segments.
n
If the division is not exact, the remaining incomplete segment is added to the end of the returned array.
<a b c d> / 2 #=> [["a", "b"], ["c", "d"]] <a b c d e> / 2 #=> [["a", "b"], ["c", "d"], ["e"]]
Aliases: ÷, div
a < b
Less-than array comparison, done term-by-term, returning true or false.
true
false
Aliases: lt
a <=> b
Array comparison, done term-by-term, returning:
1 when a > b 0 when a == b -1 when a < b
Aliases: cmp
a == b
Returns true if a and b are equal to each other.
Aliases: eq
a > b
Greater-than array comparison, done term-by-term, returning true or false.
Aliases: gt
a ^ b
Returns the set difference of two arrays.
<a a a b c> ^ <a x y a c> #=> ["a", "b", "x", "y"]
Aliases: xor
a | b
Returns the union of two arrays.
<a a a b c> | <a x y a c> #=> ["a", "a", "a", "b", "c", "x", "y"]
Aliases: or
a |>> b
Returns the
Aliases: pipeline_map_op
a |X> (block1, block2, ...)
Pipeline cross-product operator, mapping each element to each given block.
say ([1,2,3] |X> ({ .cube }, { _+42 })) #=> [1, 43, 8, 44, 27, 45]
Aliases: pipeline_cross_op
self.|Z>(*callbacks)
Aliases: pipeline_zip_op
a « b
Aliases: <<, push, append
a » b
Aliases: >>, pop, drop_last, drop_right
a ∋ b
Aliases: has, contain, include, contains, includes
a ∌ b
a ≠ b
Aliases: !=, ne
a ≤ b
Aliases: <=, le
a ≥ b
Aliases: >=, ge
arr.abbrev arr.abbrev(/pattern/)
Returns an Hash with the unambiguous abbreviations for the given array of strings.
say ['loved', 'loving', 'lover', 'lost'].abbrev
Output:
Hash( "los" => "lost", "lost" => "lost", "loved" => "loved", "lover" => "lover", "lovi" => "loving", "lovin" => "loving", "loving" => "loving" )
When an additionaly regular expression is given, it collects only the abbreviations that will match the regex.
Aliases: abbreviations
self.acc(block)
Aliases: accumulate
self.acc_by(block)
Aliases: accumulate_by
self.all(block)
self.all_composite
self.all_prime
self.any(block)
arr.avg
Returns the average of a list of numbers.
say [1,2,3,4].avg #=> 2.5
arr.avg_by { ... }
Returns the average of a list of numbers, by mapping each value to a given block of code.
say [1,2,3,4].avg_by { _**2 } #=> 7.5
arr.bindex(obj)
Returns the index of a given element inside a sorted array, using the Binary Search algorithm.
var a = ["Alice", "Jane", "Joe", "John", "Kate", "Zerg"] say a.bindex('Alice') #=> 0 (first index) say a.bindex('Jane') #=> 1 (second index)
Aliases: bsearch_index
arr.bindex_by { ... }
Returns the index of any element inside a sorted array, based on a given comparison block, using the Binary Search algorithm.
var a = ["Alice", "Jane", "Joe", "John", "Kate", "Zerg"] say a.bindex { _ <=> 'Joe' } #=> 2 (third index) say a.bindex { _ <=> 'John' } #=> 3 (fourth index)
Aliases: bsearch_index_by
self.bindex_ge(obj)
self.bindex_ge_by(obj)
self.bindex_le(obj)
self.bindex_le_by(obj)
self.bindex_max(obj)
self.bindex_max_by(block)
self.bindex_min(obj)
self.bindex_min_by(block)
arr.binsert(obj)
Inserts an element into a sorted array, such that the array will still be sorted.
var a = ['a', 'b', 'd'] a.binsert('c') # inserts 'c' before 'd' say a # prints: ['a', 'b', 'c', 'd']
Modifies the array in-place.
arr.binsplit {|a,b| ... }
Applies the binary splitting algorithm to the self-array, returning the result computed using the given block of code.
say [1,2,3,4,5].binsplit {|a,b| a*b } #=> 120
self.bsearch(obj)
Aliases: bsearch_by
self.bsearch_ge(obj)
Aliases: bsearch_ge_by
self.bsearch_le(obj)
Aliases: bsearch_le_by
self.bsearch_max(obj)
self.bsearch_min(obj)
arr.bshuffle
Shuffles an array in such a way that no element will be on the same position as in the original array (if possible).
Aliases: best_shuffle
arr.cartesian arr.cartesian {|*c| ... }
Returns the Cartesian product of a 2D array.
say [[1,2],[3,4]].cartesian #=> [[1,3], [1,4], [2,3], [2,4]]
When a block is given, it gets called which each combination:
[[1,2],[3,4],[5,6]].cartesian {|*c| say c }
[1, 3, 5] [1, 3, 6] [1, 4, 5] [1, 4, 6] [2, 3, 5] [2, 3, 6] [2, 4, 5] [2, 4, 6]
arr.cfrac2num
Converts a given continued fraction expansion to a number.
var c = Num.pi.cfrac(10) # [3, 7, 15, 1, 292, 1, 1, 1, 2, 1] say c.cfrac2num.as_frac #=> 4272943/1360120
self.change_to(arg)
self.chrs(encoding)
Aliases: decode, join_bytes
self.circular_permutations
self.clear
self.collapse(initial)
self.combinations
self.combinations_with_repetition
self.combine(block)
self.compact
arr.cons(n)
Returns a new array of arrays with n-consecutive elements from the self-array.
say [1,2,3,4].cons(2) #=> [[1, 2], [2, 3], [3, 4]]
Aliases: map_cons
self.contains_all(array)
self.contains_any(array)
self.contains_type(obj)
self.count(obj)
self.count_by(block)
self.cross_op(operator, arg)
Aliases: cross_operator
self.defined(index)
self.delete(obj)
Aliases: remove
self.delete_by(block)
Aliases: delete_if, remove_by, remove_if
self.delete_first(obj)
Aliases: remove_first
self.delete_first_by(block)
Aliases: delete_first_if, remove_first_by, remove_first_if
arr.delete_last(obj)
Removes the last obj element from the array, modifying the array in-place.
obj
var arr = %w[a b c a] arr.delete_last('a') say arr #=> ["a", "b", "c"]
Returns true if such an element was removed.
Aliases: remove_last
self.delete_last_by(block)
Aliases: delete_last_if, remove_last_by, remove_last_if
self.derangements
Aliases: complete_permutations
self.det
Aliases: determinant
self.det_bareiss
arr.diffs(n=1)
Returns the n-th differences of the array (calling sub).
sub
var a = [43, 97, 128, 999] say a.diffs #=> [54, 31, 871] say a.diffs(2) #=> [-23, 840] say a.diffs(3) #=> [863]
Aliases: differences, nth_differences
self.dig(key, *keys)
arr.digits2num(base=10)
Converts the list of values returned by Number digits(n, base) back to n.
digits(n, base)
say 1234.digits.digits2num #=> 1234 say [73, 56, 0, 76, 22].digits2num(100) #=> 2276005673
Aliases: from_digits
arr.each_2d {|a,b,c,...| ... }
Iterate over a 2D array.
[[1,2],[3,4]].each_2d {|a,b| say (a**2 + b**2) }
arr.each_cons(n, { ... })
Iterate over n consecutive values at a time.
[1,2,3,4,5,6,7].each_cons(3, {|*c| say c })
Outputs:
[1, 2, 3] [2, 3, 4] [3, 4, 5] [4, 5, 6] [5, 6, 7]
self.each_k(block)
Aliases: each_key, each_index
self.each_kv(block)
self.each_slice(n, block)
self.end
Aliases: offset
self.exists(index)
Aliases: has_index
arr.expand { ... }
Recursively expand an array, given a block of code.
say [1,[2,[3,4]],5].expand { _ } #=> [1, 5, 2, 3, 4]
Aliases: expand_by
self.extract_by(block)
self.extract_first_by(block)
self.extract_last_by(block)
arr.fetch(index, default)
Fetches a value at the given index. When the index does not exist, it returns the default value.
var a = [3,9,27] say a.fetch(2, 42) # fetches index 2 and prints: 27 say a.fetch(3, 42) # fails to fetch index 3, therefore prints: 42
self.find(block)
Aliases: first_by
self.flat
Aliases: flatten
arr.flat_map { ... }
Similar to .map{}, but it expects the returned block-value to be an array, which will be collected as a list.
.map{}
say [1,2,3,4,5].flat_map { .factor } #=> [2, 3, 2, 2, 5]
self.flip
Aliases: reverse
self.for(block)
Aliases: each, foreach
arr.freq
Returns a frequency Hash for the elements inside the array.
say ["a","b","a"].freq #=> Hash(a => 2, b => 1)
self.freq_by(block)
self.ft
self.gauss_jordan_invert
self.gauss_jordan_solve(vector)
self.gcd(block)
self.gcd_by(block)
self.gcud(block)
self.gcud_by(block)
arr.getopt(...)
Parse an array containing (long) command-line arguments, automatically converting the argument-values based on the types of the default values.
var file = File('file.dat') var length = 42 var verbose = false var args = ['--file', 'foo.txt', '--length', '1234', '--verbose'] args.getopt( 'length=i' => \length, 'file=s' => \file, 'verbose!' => \verbose, ) say file.dump #=> File("foo.txt") say length #=> 1234 say verbose #=> true
self.grep(block)
Aliases: select
arr.grep_2d {|a,b,c,...| ... }
Filtering of a 2D array, given a block of code.
say [[1,2],[3,4]].grep_2d {|a,b| a+b == 7 } #=> [[3,4]]
self.grep_kv(block)
Aliases: select_kv
self.group(block)
Aliases: group_by
self.head(arg)
Aliases: first
arr.index(obj) arr.index { ... }
Returns the first index of a given item inside the array.
say %w(a b c).index("a") #=> 0 say %w(a b c).index("c") #=> 2
When a block is given, it returns the first index of the element for which the block returns a true value:
say %w(A B C).index { .lc == 'b' } #=> 1
Aliases: index_by, first_index, first_index_by
arr.inject {|a,b| ... } arr.inject({|a,b| ... }, obj)
Reduce a given array to a single element, given a block of code that is called with a pair a,b, where a is the previous result returned by the block and b is the current element of the array.
a,b
The initial value of a is the first element of the array.
say [1,2,3,4].reduce {|a,b| a + b } #=> 10
When an additional argument is given, it will be used as the initial value for a:
say [1,2,3,4].reduce({|a,b| a + b }, 5) #=> 15
Aliases: reduce
self.insert(i, *objects)
self.inv
Aliases: invert, inverse
self.is_empty
self.item(index)
self.items(*indices)
self.iter
self.jaro_distance(arg, winkler)
self.join(delim, block)
arr.join_insert(obj)
Inserts the given object between every element of the array. Returns a new array.
say [1,2,3,4].join_insert(0) #=> [1, 0, 2, 0, 3, 0, 4]
arr.keys
Returns an array with the indices of the self-array.
say ["x","y","z"].keys #=> [0, 1, 2]
Aliases: indices
arr.keys_by { ... }
Returns an array with the indices for which the given block returns a true value.
say [41, 42, 43].indices_by { .is_prime } #=> [0, 2]
Aliases: indices_by
arr.keys_of(obj)
Returns an array with the indices of obj inside the self-array.
say [1,2,3,1,4,1].indices_of(1) #=> [0, 3, 5]
Aliases: indices_of
self.kv
Aliases: pairs, zip_indices
self.last(arg)
Aliases: tail
self.last_by(block)
self.last_uniq
Aliases: last_unique
self.last_uniq_by(block)
Aliases: last_unique_by
self.lcm(block)
self.lcm_by(block)
self.len
Aliases: size, length
self.lev(arg)
Aliases: leven, levenshtein
m1.madd(m2)
Aliases: matrix_add
self.make(size, obj)
self.make_by(size, block)
self.map(block)
Aliases: collect
arr.map_2d {|a,b,c,...| ... }
Mapping of a 2D array, given a block of code.
say [[1,2],[3,4]].map_2d {|a,b| [a**2, b**2] } #=> [[1, 4], [9, 16]]
self.map_kv(block)
Aliases: collect_kv
self.map_op(operator, *args)
Aliases: map_operator
arr.map_reduce {|a,b| ... }
Behaves almost like the reduce method, except that all the intermediary terms are returned as an array.
reduce
say [1,2,3,4,5].map_reduce {|a,b| a+b } #=> [1, 3, 6, 10, 15] say [1,2,3,4,5].map_reduce {|a,b| a*b } #=> [1, 2, 6, 24, 120]
Aliases: reduce_map
arr.match(/regex/)
Recursively match an array against a regular expression.
say ['a', ['foo'], 'b'].match(/^foo/)
self.max
self.max_by
m1.mdiv(m2)
Aliases: matrix_div
self.min
self.min_by
self.minmax
a `mmul` b
Multiply two 2D-matrices, returing a Matrix object.
Example:
say ([[1, 2], [3, 4]] `mmul` [[-3, -8, 3], [-2, 1, 4]])
Matrix( [-7, -6, 11], [-17, -20, 25] )
Aliases: matrix_mul
self.msolve(vector)
Aliases: matrix_solve
m1.msub(m2)
Aliases: matrix_sub
self.new
Aliases: call
arr.next_permutation
It modifies the self array in place to contain the next unique permutation and returns true if there are more permutations available, or false if the current permutation is the last one.
var arr = [1,1,2] do { say arr } while arr.next_permutation
[1, 1, 2] [1, 2, 1] [2, 1, 1]
arr.none { ... }
Returns true if none of the elements satisfy the condition given in the block of code.
say [2, 4, 6].none { .is_odd } #=> true
arr.nth_perm(n)
Efficiently returns the n-th permuation of the self array.
say nth_perm([0,1,2,3,4,5,6,7,8,9], 10**6)
Aliases: nth_permutation
arr.ordered_partitions arr.ordered_partitions(k) arr.ordered_partitions{|*a| ... } arr.ordered_partitions(k, {|*a| ... })
Iterates over the ordered partitions P of arr, such that P.flat == arr.
P
arr
P.flat == arr
[1,2,3,4,5].ordered_partitions(2, {|*a| say a })
[[1], [2, 3, 4, 5]] [[1, 2], [3, 4, 5]] [[1, 2, 3], [4, 5]] [[1, 2, 3, 4], [5]]
When no block is given, it returns an array containing the ordered partitions (there are binomial(n-1, k-1) ordered partitions, where n is the size of the array):
binomial(n-1, k-1)
say [1,2,3,4].ordered_partitions(2)
[[[1], [2, 3, 4]], [[1, 2], [3, 4]], [[1, 2, 3], [4]]]
Additionally, when the value for k is ommited, it generates all the ordered partitions (there are 2^(n-1) ordered partitions, where n is the size of the array):
k
2^(n-1)
[1,2,3,4].ordered_partitions{|*a| say a }
[[1], [2], [3], [4]] [[1, 2], [3], [4]] [[1], [2, 3], [4]] [[1, 2, 3], [4]] [[1], [2], [3, 4]] [[1, 2], [3, 4]] [[1], [2, 3, 4]] [[1, 2, 3, 4]]
Up to the ordering, the method is equivalent with (but more efficient):
arr.partitions(k).grep { .flat == arr }
self.pack(format)
self.pair_map(block)
Aliases: pairmap
arr.pam_op(operator, obj)
Reversed-mapping of the array, given an operator.
say [1,2,3].pam_operator('/', 10) # [10/1, 10/2, 10/3]
This method is used internally by the «OP« hyper-operator:
«OP«
say ([1,2,3] «/« 10)
Aliases: pam_operator
arr.part(n)
Partition the array into two parts, given an index:
[1,2,3,4,5].part(3) # returns: ([1, 2, 3], [4, 5]) [1,2,3,4,5].part(2) # returns: ([1, 2], [3, 4, 5])
Negative indices are supported as well:
[1,2,3,4,5].part(-1) # returns: ([1, 2, 3, 4], [5])
Aliases: partition
self.partitions(k, block)
self.perm2num
self.permutations
self.pick(amount)
self.pop_at(offset)
Aliases: delete_at, delete_index
self.pop_rand
self.pop_while(block)
self.prepend(*args)
Aliases: unshift
self.prod(arg)
arr.prod_2d {|a,b,c,...| ... }
Product of a 2D array, by mapping each row to the given block.
say [[2,4],[3,2],[5,1],[7,1]].prod_2d {|p,k| p**k } #=> 5040
arr.prod_by { ... }
Product of an array, by mapping each element to the given block.
say [1,2,3,4].prod_by {|n| n**3 } # product of each element cubed
self.prod_kv(block)
self.prodmod(mod)
self.rand(amount)
Aliases: sample
arr.rand_perm
Returns a random permutation of the self array.
var arr = %w(a b c d e f g) say arr.random_permutation
Additionally, by setting a seed value for irand with Number iseed(), the results returned by random_permutation can be reproduced.
irand
iseed()
random_permutation
Example with iseed():
iseed(42) var arr = %w(a b c d e f g) say arr.random_permutation #=> ["d", "f", "g", "b", "c", "e", "a"]
Aliases: random_permutation
self.range
arr.recmap { ... }
Recursively map the value of an array, given a block of code.
# Generate all the 5-smooth numbers <= 20 var (a, k, L) = ([1], 5, 20) k.primes.each {|p| a.recmap! {|n| n*p <= L ? [n*p] : () } } say a.sort #=> [1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20]
self.reduce_op(operator, initial)
Aliases: reduce_operator
arr.resize(index)
Efficienlty resize the array to a given index, modifying the array in-place.
var arr = %w[a b c d e] arr.resize(2) # removes indices > 2 say arr # ['a', 'b', 'c']
Use index -1 to empty the array.
-1
Aliases: resize_to
self.rindex(obj)
Aliases: rindex_by, last_index, last_index_by
self.rotate(num)
self.rref
Aliases: reduced_row_echelon_form
self.rscalar_op(operator, scalar)
Aliases: rscalar_operator
arr.run_length arr.run_length { ... }
The run-length algorithm, returning an array of pairs [a,n].
[a,n]
say [1,1,1,2,3,3].run_length #=> [[1, 3], [2, 1], [3, 2]] say %w(a a b C c c).run_length { .lc } #=> [['a', 2], ['b', 1], ['C', 3]]
Aliases: run_length_by
self.sadd(scalar)
Aliases: scalar_add
self.scalar_op(operator, scalar)
Aliases: scalar_operator
self.sdiv(scalar)
Aliases: scalar_div
arr.segment(indices...)
Segment an array at the given indices.
var arr = [1,2,3,4] say arr.segment(1) #=> [[1, 2], [3, 4]] say arr.segment(2) #=> [[1, 2, 3], [4]] say arr.segment(0, 1, 2) #=> [[1], [2], [3], [4]] say arr.segment(0, 2) #=> [[1], [2, 3], [4]]
Negative indices can be used for couting from the end of the array (e.g.: -1 means the end of the array).
arr.segment_by { ... }
Segment the array into multiple sub-arrays, whenever the block returns a true value.
# Segment the array after each prime number say @(1..prime(5)).segment_by { .is_prime }
[[1, 2], [3], [4, 5], [6, 7], [8, 9, 10, 11]]
self.shift(num)
Aliases: drop_left, drop_first
self.shift_while(block)
self.shuffle
arr.slice(offset) arr.slice(offset, length)
Extracts a slice out of the self-array and returns it. First entry is at offset zero.
If offset is negative, starts that far back from the end of the array.
offset
If length is omitted, returns everything through the end of the array.
length
If length is negative, leaves that many entries off the end of the array.
self.slice_after(block)
self.slice_before(block)
array.slices(n)
Slices the self-array into multiple sub-arrays, each sub-array having at most n elements.
say [1,2,3,4].slices(2) #=> [[1, 2], [3, 4]] say [1,2,3,4,5].slices(2) #=> [[1, 2], [3, 4], [5]]
Aliases: map_slice
self.smul(scalar)
Aliases: scalar_mul
arr.solve_rec_seq
Attempts to find a minimal linear recurrence that generates the given array of numbers:
say 30.of { .fibonacci }.solve_rec_seq #=> [1, 1] say 30.of { .square }.solve_rec_seq #=> [3, -3, 1] say 30.of { .faulhaber(2) }.solve_rec_seq #=> [4, -6, 4, -1]
Aliases: find_linear_recurrence
arr.solve_seq(offset=0)
Returns a Polynomial object that generates the terms of the given sequence.
say 20.of { .square }.solve_seq #=> x^2 say 20.of { .faulhaber(2) }.solve_seq #=> 1/3*x^3 + 1/2*x^2 + 1/6*x
Example with offset:
say 20.of { (_+10)**3 }.solve_seq #=> x^3 + 30*x^2 + 300*x + 1000 say 20.of { (_+10)**3 }.solve_seq(10) #=> x^3
arr.sort arr.sort {|a,b| ... }
Returns a new sorted array:
say [3,2,1,4].sort #=> [1,2,3,4] say ['c','a','b'].sort #=> ['a','b','c']
An optional comparison block can be given, which is called with two elements a and b and must return -1, 0 or 1, corresponding to how a and b must be ordered in the returned array:
0
1
say [3,2,1,4].sort {|a,b| a <=> b } #=> [1,2,3,4] say [3,2,1,4].sort {|a,b| b <=> a } #=> [4,3,2,1]
arr.sort_by { ... }
Sort an array by mapping each value to the given block.
[4,3,1,2].sort_by { _ } # same as .sort() [4,3,1,2].sort_by {|n| -n } # reversed numerical sorting %w(foo fo f).sort_by { .len } # sort array by length
self.splice(offset, length, *objects)
self.split(obj)
arr.split_by { ... }
Splits the given array by the objects at which the given block returns a true value.
say [1,2,0,3,0,4].split_by { _ == 0 } #=> [[1, 2], [3], [4]]
self.ssub(scalar)
Aliases: scalar_sub
arr.stack arr.stack { ... }
Groups runs of identical elements.
say <a a a b b c>.stack #=> [["a", "a", "a"], ["b", "b"], ["c"]
When a block of code is given, the stocking is done based on the mapping of each element to the given block:
say <A B b A b B A>.stack_by { .uc }
[["A"], ["B", "b"], ["A"], ["b", "B"], ["A"]]
Aliases: stack_by
self.subsets
self.sum(arg)
arr.sum_2d {|a,b,c,...| ... }
Sum of a 2D array, by mapping each row to the given block.
say [[2,4],[3,2],[5,1],[7,1]].sum_2d {|p,k| p**k } #=> 37
arr.sum_by { ... }
Sum of an array, by mapping each element to the given block.
say [1,2,3,4].sum_by {|n| n**2 } # sum of each element squared
self.sum_kv(block)
self.summod(mod)
self.swap(i, j)
self.take_left(amount)
self.take_right(amount)
self.to_a
Aliases: to_array
self.to_bag
self.to_h
Aliases: to_hash
self.to_m
Aliases: to_matrix
self.to_s
Aliases: dump, to_str
self.to_set
self.to_v
Aliases: to_vector
self.tuples
Aliases: variations
self.tuples_with_repetition
Aliases: variations_with_repetition
self.uniq
Aliases: unique, distinct
self.uniq_by(block)
Aliases: unique_by
arr.uniq_permutations arr.uniq_permutations { ... }
It uses the next_permutation method to create all the unique permutations of the self-array.
next_permutation
say [1,1,2].unique_permutations #=> [[1, 1, 2], [1, 2, 1], [2, 1, 1]
Equivalent with arr.permutations.uniq, but more efficient, as it creates the permutations without duplicates.
arr.permutations.uniq
The method also accepts a callback block as an optional argument:
[1,1,2].unique_permutations {|*perm| say perm }
Aliases: unique_permutations
self.uniq_prefs(block)
Aliases: unique_prefixes
self.unroll_op(operator, arg)
Aliases: unroll_operator
self.unzip_by(block)
self.weighted_shuffle_by(block)
m1.wise_op(operator, m2)
Aliases: wise_operator
self.zip(block)
Aliases: transpose
self.zip_by(block)
self.zip_op(operator, arg)
Aliases: zip_operator
To install Sidef, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sidef
CPAN shell
perl -MCPAN -e shell install Sidef
For more information on module installation, please visit the detailed CPAN module installation guide.