8h
comment Read and writing to file in Haskell
or just hGetContents' h = do { c <- hGetContents h ; if (length c > 0) then return c else return "" }.
10h
revised Haskell - apply tuple of functions to tuple of values?
curry3 is the name; different ap3 makes more sense
11h
revised Multiple folds in one pass using generic tuple function
uncurry4 is the name
21h
comment Merging two lists in Haskell
@dfeuer (the above comment)
21h
revised Another Pollard Rho Implementation
language: c++
1d
revised Map a function over a string
edited tags
1d
comment Merging two lists in Haskell
another case for your unfoldr' apomorphism! (then it'll be equivalent to this answer above).
1d
revised Understanding concatMap recursion
comments
2d
revised Understanding concatMap recursion
added 621 characters in body
2d
answered Understanding concatMap recursion
2d
comment Improving naive qsort implementation
@ReidBarton yes, it adds O(n^2) ops where it's already O(n^2); but it could've been O(n), so it's bound to affect constant factors.
2d
comment Improving naive qsort implementation
here's another version of it that's supposed to be faster.
2d
comment Implementing tails using foldr in Haskell
@dfeuer as we've found out few weeks later, it can be done with apomorphism; which can be simulated by a standard unfoldr with a nested Maybe. I guess that's how you came up with that question, maybe.
Jul
27
revised A "Building" Riddle in Prolog
title: not about building a puzzle in Prolog
Jul
27
comment Tangents range for all pairs of points in a box
having four points in lexicographical (x,y) order, { (0,0), (1,5), (2,1), (2,10) }, isn't the smallest angle achieved by connecting the points 1 and 3? (ah, I see you've commented to that effect on the question already...).
Jul
27
awarded Revival
Jul
25
comment sort/2, keysort/2 vs. samsort/3, predsort/3
@j4nbur53 this might be a good question for cs.stackexchange.com or cstheory.stackexchange.com.
Jul
25
comment sort/2, keysort/2 vs. samsort/3, predsort/3
@j4nbur53 presumably we can always encode non-cyclic terms as finite lists of atoms and numbers... I haven't thought it fully through obviously...
Jul
25
revised sort/2, keysort/2 vs. samsort/3, predsort/3
added 1020 characters in body
Jul
25
comment sort/2, keysort/2 vs. samsort/3, predsort/3
this all started at stackoverflow.com/questions/31571094/… , it was about sorting with some primary and secondary comparison criteria, and the Decorate-Sort-Undercorate pattern. so standard order of terms is useful in that situation. your atom negation disproves my answer in that respect (that it's impossible and we must use reverse/2). the D-S-U is important when the comparison predicate is slow - it replaces loglinear number of comparisons with liner number of key constructions.
1 2 3 4 5