[xquery-talk] Functional paradigm shift

Adam Retter adam.retter at googlemail.com
Wed Dec 11 15:11:47 PST 2013

I think the classic text is SICP (Structured Interpretation of Computer
Programs). This can be downloaded for free.

If you still do .Net stuff, maybe worth switching to F# to force you more
into a functional approach.

> For example I am doing this a lot:
> let $result := some-func()
> let $a := if($result eq 0)
> then()
> else(logger:log($result),error())
> It just doesn't feel right.

Sequences are the key. One approach is to just map/transform on sequences,
if you have an empty sequence then nothing happens, else you get the
expected result ;-)

> -c
> ________________________________
> The contents of this message may be privileged and confidential.
Therefore, if this message has been received in error, please delete it
without reading it. Your receipt of this message is not intended to waive
any applicable privilege. Please do not disseminate this message without
the permission of the author.
> Please consider the environment before printing this e-mail
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20131211/3f500175/attachment.html>

More information about the talk mailing list