Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 
avatar of Will Ness

Will Ness

Will Ness has asked 17 questions and find answers to 430 problems.

Stats

9.2k
EtPoint
2.6k
Vote count
17
questions
430
answers

About

Empirical orders of growth, please!

primes = [2..] \ [[p², p²+p ..] | p <- primes]

((g<=<f)=<<) = (g=<<).(f=<<) = join.(g<$>).join.(f<$>)

Monads as generalized function application

condU:(g ~~>! h) f x = case g x of [] -> f x; (y:_) -> h y
apply (FUNARG lambda env) xs a = apply lambda xs env
hammingSlice hi w = (c, sortBy (compare `on` fst) b) where
1:foldr (\n s->fix (merge s . (n:) . map (n*))) [] [2,3,5]
ordfactors = foldr g [1] . reverse . primePowers where

in a declarative language,
length(a) == 0 is the same as null(a),
and [y | x <- [1..], y <- []] is just [].

What's in a powerset? A set's subsets...
(define (call/cc& proc& k) (proc& k k))
(define (list . xs) xs)


How Monads are considered Pure?
Monads are EDSLs are Nested Loops are Trees:
do { [1,2,3] ; [4,5] } =>
do { x <- [1,2,3] ; do { y <- [4,5] ; return y }} =>
for x from [1,2,3] { for y from [4,5] { yield y }} =>
[ 4,5, 4,5, 4,5 ]


Is your ( programming ) language ( high-level ) enough?