[Haskell-beginners] Unmaybe

Adrian May adrian.alexander.may at gmail.com
Wed May 15 16:37:56 CEST 2013


I seem to have come up with something:

main = putStrLn $ show $
  "Foo".:.100 |:|
  "Bar".:.10 >:> (
                 "Ket".:.20 >^> "Pod".:.1 |^|
                 "Zig".:.30
                 ) >:> "Erm".:.15
                                          >@> "Nuk".:.50
                            >@> "Din".:.30

says:

1:Foo=0.0->100.0
2:Bar=0.0->10.0
3:Ket=10.0->30.0
4:Pod=30.0->31.0
5:Zig=10.0->40.0
6:Erm=40.0->55.0
7:Nuk=31.0->81.0
8:Din=30.0->60.0

I'd best give names to those forks though otherwise the whole project plan
will break whenever I insert a new one. Can I give a parameter to an
operator? Like:

task1 `fork "name"` taskb

or:

task1 ( >^> "name" ) taskb

Adrian.





On 15 May 2013 20:22, Kim-Ee Yeoh <ky3 at atamo.com> wrote:

> On Wed, May 15, 2013 at 9:58 AM, Adrian May <
> adrian.alexander.may at gmail.com> wrote:
>
>> The list indices ati and bti are used only once: to retrieve the (first)
>>> item matching the predicate. Might Data.List.find be a better fit?
>>>
>>
>> No, I use them via t1 and t2 to figure out which row to put the squiggle
>> on. The attached picture might put it all in perspective.
>>
>>>
> D'oh. Didn't see the later references, sorry.
>
> Something to think about is: how would you document "my coordinate system"
> as you wrote in your comment? Highly visual things like these are
> challenging to describe even for verbal-thinking types.
>
> Probably sticking the picture in png/pdf format and linking to it in the
> comments is a good a solution as any.
>
> -- Kim-Ee
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130515/74b1bbb6/attachment.htm>


More information about the Beginners mailing list