Show / Hide Table of Contents

Namespace Fluency.Execution.Functions.BuiltIn

Classes

Com

A Fluency source code comment. Passes input to output. Same as Comment

Comment

A Fluency source code comment. Passes input to output.

Const

Returns an infinite stream of its arguments.

Drain

Takes all values from both inputs and returns nothing.

Dup

Reads a value from the top input and puts it on both top and bottom outputs.

Duplicate

Reads a value from the top input and puts it on both top and bottom outputs. Same as Dup

Expand

Reads a function f from the top pipeline and expands in place, replacing itself with f and passing its arguments to f.

First

Returns the first N values, then puts the rest on the bottom. If no arguments given, N is 1.

FirstN

Returns the first N values, then puts the rest on the bottom. If no arguments given, N is read from the top pipeline.

I

The identity function. Passes input to output. Same as Comment

MergeBottom

Pass everything from the bottom input to the top output, then everything from the top input to top output.

MergeIf

Reads one element from the top pipeline. If true, put everything from the bottom pipeline onto the top. Otherwise, return nothing.

MergeTop

Pass everything from the top input to the top output, then everything from the bottom input to top output.

SwitchIn

If SwitchIn(true), put everything from the top input onto the top pipeline. If SwitchIn(false), put everything from the bottom input onto the top pipeline. If no argument given, treat the first value seen as if it was passed as the argument.

SwitchOut

If SwitchOut(true), put everything from the top input onto the top pipeline. If SwitchOut(false), put everything from the top input onto the bottom pipeline. If no argument given, treat the first value seen as if it was passed as the argument.

Unzip

If Unzip(true), put an element from the top pipeline onto the top pipeline, then top to bottom, then top to top, and so on. If Unzip(false), same, but put on the bottom pipeline first. If no argument given, treat the first value seen as if it was passed as the argument.

WrapBinary<TRealTop, TRealBottom, TRealOut>

Wrap a C# function that takes two arguments and returns one value as a Fluency function that:

  • If no arguments given, read something from the top and the bottom and do the operation on them.
  • If one top argument given, read something from the bottom and do the operation with that and the argument.
  • If one bottom argument given, read something from the top and do the operation with that and the argument.
  • This is how Add, Mult, Equals, LessThan, GreaterThan, And, Or, AddDouble, DivDouble, and Concat are implemented.

WrapBinaryFold<TReal>

Wrap a C# function that takes two arguments and returns one value as a Fluency function. This is different from WrapBinary<TRealTop, TRealBottom, TRealOut> because it implements a fold operation- that is:

  • Read two values from the top. Do the operation on both of them. Store that value.
  • Read new values and do them on the stored value until you either finish or hit the short circuit value and stop.
  • This is how All and Any are implemented.

WrapBinaryStreamOutput<TRealTop, TRealBottom, TRealOut>

Wrap a C# function that takes two arguments and returns many values as a Fluency function. Works just like WrapBinary<TRealTop, TRealBottom, TRealOut>, except it wraps something that returns more than one value.

  • If no arguments given, read something from the top and the bottom and do the operation on them.
  • If one argument given, read something from the top and do the operation with that and the argument.
  • This is how Split is implemented.

WrapBinaryTwoOutputs<TRealTop, TRealBottom, TRealTopOut, TRealBottomOut>

Wrap a C# function that takes two arguments and returns two values as a Fluency function. Works just like WrapBinary<TRealTop, TRealBottom, TRealOut>, except it wraps something that returns exactly two values.

  • If no arguments given, read something from the top and the bottom and do the operation on them, returning something on top and something on the bottom.
  • If one top argument given, read something from the bottom and do the operation with that and the argument.
  • If one bottom argument given, read something from the top and do the operation with that and the argument.
  • This is how DivMod is implemented.

WrapUnary<TRealIn, TRealOut>

Wrap a C# function that takes one argument and returns one value as a Fluency function.

  • This is how Sqrt, Floor, Not, and ParseInt are implemented.

Zip

If Zip(true), put an element from the top pipeline onto the top pipeline, then bottom to top, then top to top, and so on. If Zip(false), same, but take from the bottom pipeline first. If no argument given, treat the first value seen as if it was passed as the argument.

Back to top Generated by DocFX