Crate kaguya_rs[][src]

KaguyaRs aims to provide a common functional programming lib on Rust.

Basic functions and ADTs with implementation will be provided as much as I can.

Modules

basic_fn

Macros

abs

Absolute of signed

add

x + y

always

always return first memorized values

compose

This macro is used to provide shortcut of function composition. The order is last-in-first-invoke.

concat

Extend concat

div

x / y

even

check if a number is even

filter

Curry macro of filter

filter_not

Curry macro of filter_not

find

macro of find(k, iter)

foldl

Curry macro of foldl

foldr

Curry macro of foldr

fst

Get the first element of [tuple]

ls

This macro is used to provide ability of list comprehension. Return Vec.

map

Curry macro of map

mul

x * y

odd

check if a number is odd

pipe

This macro is used to provide shortcut of function composition. The order is last-in-last-invoke.

product

Shorthand macro of product

recip

1/x

rem

Get reminder of division

signum

Signum of signed

skip

Shorthand of skip

snd

Get the second element of [tuple]

sorted_by

macro of sorted_by

sub

x - y

sum

Shorthand macro of sum

take

Shorthand of take

zip

macro of sorted_with

zip_with

macro of zip_with