This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* NAME: GETλ | |
DESCRIPTION: Returns a data object from data-dictionary. The function takes two distinct parameter strings; | |
the first specifies the directory name and the second the keyword | |
REVISIONS: Date Developer Description | |
Dec 19 2024 Peter Bartholomew Original Development | |
*/ | |
GETλ | |
= LAMBDA(dict, LAMBDA(key, | |
LET( | |
uniqueKeys, TAKE(dict,,1), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* FUNCTION NAME: INJECTλ | |
DESCRIPTION: Identifies submatices and applies further array shaping functions to inner and outer arrays */ | |
/* REVISIONS: Date Developer Description | |
02 Nov 2024 Peter Bartholomew Initial implemention | |
*/ | |
INJECTλ | |
= LAMBDA(nestedArr, depth, width, FNλ, BYλ, [SHPλ], | |
LET( | |
bRows, 1+QUOTIENT(ROWS(nestedArr)-1, depth), | |
bCols, 1+QUOTIENT(COLUMNS(nestedArr)-1, width), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* FUNCTION NAME: COMBINATIONAλ | |
DESCRIPTION:*//*Lists all comninations of m objects taken from n*/ | |
/* REVISIONS: Date Developer Description | |
29 Mar 2024 Peter Bartholomew Original development | |
*/ | |
/* REQUIRED: NextColumnAλ, ϑSTACKλ, THUNKλ, FINALVALUEλ, | |
*/ | |
COMBINATIONAλ = LAMBDA( | |
// Parameter Declarations | |
[n], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* FUNCTION NAME: MAPλ | |
DESCRIPTION: Implements a version of MAP that will return an array of arrays */ | |
/* REVISIONS: Date Developer Description | |
28 Aug 2024 Peter Bartholomew Adapted from BYROWλ to give MAPλ | |
31 Aug 2024 Peter Bartholomew JOINPAIRSλ modified to stack 2D result arrays | |
10 Sep 2024 Peter Bartholomew Modified to accept 3 array argumments before λ-function | |
15 Nov 2024 David Clements Improved branching using CHOOSE | |
*/ | |
MAPλ = LAMBDA( | |
// Parameter Declarations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* FUNCTION NAME: SCANVλ | |
DESCRIPTION: Implements a version of SCAN that will return a column of arrays */ | |
/* REVISIONS: Date Developer Description | |
19 May 2024 Peter Bartholomew Original Development | |
06 Dec 2024 Peter Bartholomew Simplify definition of Fλ and use EVALTHUNKARRAYλ | |
for compatibility with MAPλ | |
*/ | |
SCANVλ = LAMBDA( | |
// Parameter Declarations | |
[y₀], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* FUNCTION NAME: Calculateλ | |
DESCRIPTION:*//**Builds tables of output costs from input and output tables*/ | |
/* REVISIONS: Date Developer Description | |
01 Mar 2024 Peter Bartholomew Original Component | |
17 Jul 2024 Peter Bartholomew Major revision to tracking entries in combined table | |
*/ | |
Calculateλ | |
=LAMBDA( | |
// Parameter Declarations | |
[outFlow], [inFlow], [unitCost], [option], |