ramda#concat TypeScript Examples

The following examples show how to use ramda#concat. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TExp.ts    From interpreters with MIT License 6 votes vote down vote up
matchTVarsInTEs = <T1, T2>(te1: TExp[], te2: TExp[],
                                    succ: (mapping: Array<Pair<TVar, TVar>>) => T1,
                                    fail: () => T2): T1 | T2 =>
    (isEmpty(te1) && isEmpty(te2)) ? succ([]) :
    (isEmpty(te1) || isEmpty(te2)) ? fail() :
    // Match first then continue on rest
    matchTVarsInTE(first(te1), first(te2),
                    (subFirst) => matchTVarsInTEs(rest(te1), rest(te2), 
                                        (subRest) => succ(concat(subFirst, subRest)), 
                                        fail),
                    fail)
Example #2
Source File: lexicalAddress.ts    From interpreters with MIT License 5 votes vote down vote up
crossContour = (decls: VarDecl[], addresses: LexicalAddress[]): LexicalAddress[] =>
    concat(makeBoundAddresses(decls), map(makeDeeperLexicalAddress, addresses))