Class: System::F

Overview

module System

Direct Known Subclasses

F

Class Method Summary collapse

Methods included from Collections::ConverterLambdas

from_stream, lines_from_file, to_a, to_array, to_h, to_hash, to_set, to_stream

Methods included from Collections::ObjectLambdas

eq, equal, equals, id, list

Methods included from Collections::ProcishLambdas

apply, apply_fn, apply_with, apply_with2, compose, cstep, fix, flip, repeat, slf, step, unfoldl

Methods included from Collections::BooleanLambdas

and, ands, nand, nor, not, or, ors, xor

Methods included from Collections::NumericLambdas

dec, div_by, div_from, double, gt, gte, inc, inf, infinity, is_gt, is_gte, is_lt, is_lte, lt, lte, max, min, negative_infinity, ninf, plus, square, sub_by, sub_from, times

Methods included from Collections::StreamDropAndTakeLambdas

drop, drop_except, drop_until, drop_while, take, take_until, take_while

Methods included from Collections::OneForOneStreamLambdas

mapleft, replace_with, scanleft, zip_with

Methods included from Collections::FoldableStreamLambdas

bucket_by, bucket_by_and_summarize, foldleft, foldr, partition_by

Methods included from Collections::HigherOrderStreamLambdas

all?, any?, filter, find_last_where, find_where, first_index_where, flatmap, group_by, last_index_where, slice_by, split_by, window_by

Methods included from Collections::NumericStreamLambdas

maximum, maximum_by, mean, minimum, minimum_by, naturals, product, range, sum, sum_of_differences_from_estimated_mean_two_pass, sum_of_squares

Methods included from Collections::StreamLambdas

append, cartesian_product, concat, cons, contains?, contains_slice?, continuous_subsequences, difference, does_not_contain?, empty, empty?, enconcat, ends_with?, final, first, first_index_of, group, head, init, initial, inits, intercalate, interleave, intersect, intersperse, last, last_index_of, length, length_at_least, null?, partition_at, prefix, prefixes, quicksort, replace, rest, reverse, rotate, snoc, starts_with?, subsequences, suffix, suffixes, tail, tails, transpose, uncons, union, unsnoc, unzip, window, wrap, zip, zip_with_index

Class Method Details

.appObject



1234
1235
1236
# File 'lib/raskell/f.rb', line 1234

def self.app
  @@app||= ->(*fs) { apply.(fs.first, fs.drop(1)) }
end

.foldObject



1238
1239
1240
# File 'lib/raskell/f.rb', line 1238

def self.fold
  @@fold||= ->(fn, u) { final * scanl.(fn, u) }
end