winterkoninkje: shadowcrane (clean) (Default)
wren romano ([personal profile] winterkoninkje) wrote 2013-01-18 02:55 am (UTC)

For your enjoyment:

domain :: Finite a => [a]
domain = toList . execWriter . assemble $ tell . return


Where toList is from DList and brings the runtime down to O(n) instead of O(n^2) due to the writer monad always appending to the right.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

Loading anti-spam test...

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org