"Proofs are Programs" https://www.youtube.com/watch?v=AGnTnbR1sSg
#Philosophy #ComputerScience #Mathematics #CurryHowardCorrespondence #Currying #Haskell #HaskellCurry #TypeTheory #Computation #Logic
"Proofs are Programs" https://www.youtube.com/watch?v=AGnTnbR1sSg
#Philosophy #ComputerScience #Mathematics #CurryHowardCorrespondence #Currying #Haskell #HaskellCurry #TypeTheory #Computation #Logic
Another #CodeGolf puzzle for #JavaScript #WebDev people:
I have n functions that type one argument of the same type and return a boolean.
The current usage is:
function a(b) {
return c(b) && d(b)
}
I boiled down a to
a = (b) => [c, d].every(fn => fn(x))
I assume, this can be further boiled down via bind/ #PartialApplication/ #Currying
What do you think?
#amCoding #amProgramming #webDevelopment #softwareDevelopment #softwareEngineering
What is Currying?
#currying, named after Haskell Curry (1900-1982), is a technique of transforming a function that takes multiple arguments into a sequence of functions, each taking a single argument. For example, a function f(a, b, c) becomes f(a)(b)(c).
This is accomplished using closures. When you call f(a), it returns a new function that "remembers" the value of a. When you then call that returned function with b, it returns another function that remembers both a and b, and so on. This ...
Currying Explained! 🌟
Named after Haskell Curry, it doesn't involve spices! 🍛
Currying transforms a function into a series of nested functions, each with access to variables via closures. This makes functions more modular and reusable.
#programming #javascript #python #webdev #currying #closures
Расширение Функциональных Интерфейсов Java
За годы прошедшие с их появления в Java8 у меня набралась коллекция полезных решений и шаблонов, которые я переносил из проекта в проект, и которые в стандартной версии так и не были осуществлены. Недавно я решил собрать все вместе в небольшом проекте с открытым кодом. В первом релизе проекта расширения охватывают следующие аспекты:
https://habr.com/ru/articles/812451/
#Java #functional_interface #functional_programming #currying #multimethods #exception #exception_handling #extensions #interception #java_21
does any #programmingLanguage have something like partial evaluation based on named parameters? so like #currying, but you can add the parameters in any order, and get a function back that that evaluates the still missing parameters?
it seems pretty handy to me…
here is an example for how i think this could work in #JS:
"un- #currying, is useful in some situations. eg, let's say we want to split a list into two parts - elements that are smaller than 10 and the rest, and then concatenate those two lists. Splitting of the list is done by partition (< 10) (here we also use curried <). The result is of type ([Int],[Int]). Instead of extracting the result into its first and second part and combining them using ++, we can do this directly by uncurrying ++ as
uncurry (++) . partition (< 10)"
https://softwareengineering.stackexchange.com/questions/185585/what-is-the-advantage-of-currying