[darcs-users] darcs patch: Module haddock for English. (and 3 more)

Trent W. Buck trentbuck at gmail.com
Thu May 14 01:38:14 UTC 2009


Eric Kow <kowey at darcs.net> writes:

> Teach src/English to generate a natural list from a Haskell list.
> -----------------------------------------------------------------
>> Trent W. Buck <trentbuck at gmail.com>**20090509144221
>>  Ignore-this: 68e7f2e584d5089f9bf3326d6af7e27f
>> ] hunk ./src/English.hs 23
>> +-- | Given a list of things, combine them thusly:
>> +--
>> +--   > orClauses ["foo", "bar", "baz"] == "foo, bar or baz"
>> +andClauses, orClauses :: [String] -> String
>> +andClauses = intersperseLast ", " " and "
>> +orClauses  = intersperseLast ", " " or "
>
> Does this do what you expect in the haddock?
> And do you really mean clauses, here?

On reflection, I think I meant "phrases".



More information about the darcs-users mailing list