Your example is the same as not setting a Provider, from what I can understand
Your example is the same as not setting a Provider, from what I can understand
const x = () => f()
const y = () => f()
is the same program as
const x = () => f()
const y = x
const x = () => f()
const y = () => f()
is the same program as
const x = () => f()
const y = x
const x = f()
const y = f()
is not safely replaceable by
const x = f()
const y = x
since Promises are eager and their result is cached
const x = f()
const y = f()
is not safely replaceable by
const x = f()
const y = x
since Promises are eager and their result is cached
the cardinality of Unit -> X is the same as X.
The cardinality of X -> Unit is 1.
the cardinality of Unit -> X is the same as X.
The cardinality of X -> Unit is 1.
It’s a bit like hashing (going from a big set to a smaller set), if that makes any sense
It’s a bit like hashing (going from a big set to a smaller set), if that makes any sense
def f = 42 // a function without parameters
type checks the same as
val f = 42 // a constant value
(*caveats apply because the JVM, but this is conceptually sound)
def f = 42 // a function without parameters
type checks the same as
val f = 42 // a constant value
(*caveats apply because the JVM, but this is conceptually sound)
() => x is the same as x
but
(x) => {} is not the same as x
() => x is the same as x
but
(x) => {} is not the same as x
X -> Unit consumes an X, so it’s not the same as having an X.
X -> Unit consumes an X, so it’s not the same as having an X.
Here’s a cool paper (a bit hard to digest, but you might like it)
Here’s a cool paper (a bit hard to digest, but you might like it)
Many concepts you talk about are alien in TypeScript, but quite familiar in functional languages like Haskell and Scala (Lean syntax looks a bit like Haskell and I doubt it’s coincidental).
Many concepts you talk about are alien in TypeScript, but quite familiar in functional languages like Haskell and Scala (Lean syntax looks a bit like Haskell and I doubt it’s coincidental).
Now it’s just crap , so it’s broken like it was a while back when they found and fixed a bug after @danabra.mov reported it
Now it’s just crap , so it’s broken like it was a while back when they found and fixed a bug after @danabra.mov reported it