As we all know, let expression is actually just a syntactic sugar for immediately invoked lambda expression (IILA). Actually not entirely correct, as pointed out in this comment.
For example, in Haskell:
let x = a in b
is the same as
// Note: the following grammar has not yet included Unary Tree | |
Ibx { | |
Exp | |
= BinaryExp | |
BinaryExp | |
= BinaryExp PriExp PriExp -- BinaryExp | |
| PriExp | |
PriExp |
⌊/⍋⍤,⍨~⊢ |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.execute = execute; | |
exports.executeSync = executeSync; | |
exports.assertValidExecutionArguments = assertValidExecutionArguments; | |
exports.buildExecutionContext = buildExecutionContext; | |
exports.collectFields = collectFields; |
export const modus_ponens | |
// Proposition | |
// Given: A => B and A | |
// We can conclude: B | |
: <A, B>(f: (a: A) => B, a: A) => B | |
= <A, B>(f: (a: A) => B, a: A) => f(a) | |
// Note, in intuitionistic logic, ~A (a.k.a NOT A), is represented as A => never | |
export const modus_tollens | |
// Proposition: |
As we all know, let expression is actually just a syntactic sugar for immediately invoked lambda expression (IILA). Actually not entirely correct, as pointed out in this comment.
For example, in Haskell:
let x = a in b
is the same as
export const x = import.meta.url |
import * as _0 from 'https://deno.land/x/a0/mod.ts' | |
import * as _1 from 'https://deno.land/x/cmd/mod.ts' | |
import * as _2 from 'https://deno.land/x/adka_server/mod.ts' | |
import * as _3 from 'https://deno.land/x/actdb/mod.ts' | |
import * as _4 from 'https://deno.land/x/airtable/mod.ts' | |
import * as _5 from 'https://deno.land/x/adka/mod.ts' | |
import * as _6 from 'https://deno.land/x/abc/mod.ts' | |
import * as _7 from 'https://deno.land/x/amqp/mod.ts' | |
import * as _8 from 'https://deno.land/x/alosaur/mod.ts' | |
import * as _9 from 'https://deno.land/x/ascii_table/mod.ts' |
//@ts-nocheck | |
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("source-map")):"function"==typeof define&&define.amd?define(["exports","source-map"],t):t((e=e||self).Terser={},e.sourceMap)}(this,(function(e,t){"use strict";function n(e){return e.split("")}function i(e,t){return t.includes(e)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;class r extends Error{constructor(e,t){super(),this.name="DefaultsError",this.message=e,this.defs=t}}function o(e,t,n){!0===e&&(e={});const i=e||{};if(n)for(const e in i)if(D(i,e)&&!D(t,e))throw new r("`"+e+"` is not a supported option",t);for(const n in t)if(D(t,n))if(e&&D(e,n))if("ecma"===n){let t=0|e[n];t>5&&t<2015&&(t+=2009),i[n]=t}else i[n]=e&&D(e,n)?e[n]:t[n];else i[n]=t[n];return i}function a(){}function s(){return!1}function u(){return!0}function c(){return this}function l(){return null}var f=function(){function e(e,o,a){var s,u=[],c=[];function l(){var l=o(e[s],s),f=l instanceof r;return f&&(l=l.v),l instanceof |
/* | |
Funcords is a feature that combine functions and records. | |
If you think about it, record is actually a dependently typed function, | |
where the output type depends on the input type. | |
For example, | |
r = {'x': 1, 'y': 'yo'} | |
// Record type | |
{}: `{} | |
// construction | |
{x = {}}: `{x: `{}} | |
// destruction | |
{x: `{}} = {x = {}} | |
// abstraction |