Archive for January, 2009
More longest paths, and sick folds.
This week’s simple longest path exercise seems to have had more mileage in it than I expected. Thanks to everyone’s comments and suggestions, I’ve updated with a number of times with, among other things, an improved Haskell version that acts on path elements instead of just characters. But I had intended to do a version […]
There’s the nub (snippet in Perl and Haskell)
Here’s a simple problem, with solutions in Perl and Haskell. @joel: suppose I have a list of strings (they happen to be paths) – how might I find only the longest instance of each path? @joel: that is give /foo /foo/bar /foo/bar/baz /qux I only want back /foo/bar/baz and /qux @joel: do I need to […]