Hey nice. I'm still trying to grasp the language and I have done bits and pieces of programming but not enough to function by, no pun intended. I'm slowly learning though. > On Nov 20, 2014, at 11:55 AM, Tony Miller <[email protected]> wrote: > > Hey Ken, > > This post is a bit old so maybe you figured it out by now. > (string*string) is a pair, or tuple, of two strings. Like: > ("foo", "bar") > > You could have other types of tuples like (int*int), (string*int), etc. > > So in (([(string*string)])->unit), the type is a function that takes a > list of (string*string) tuples and returns a unit. > > A unit is some terminology borrowed from other functional programming > languages I believe. As far as I know, it basically means that the > return type doesn't really matter. In functional languages however, > functions *must* return a type, so when a function returns something > that isn't particularly interesting it is denoted as 'unit'. > > I found this info here, it is a bit hard to find: > http://savonet.sourceforge.net/doc-svn/language.html > > There are several useful pages like this but they are kind of > difficult to locate, like this one too: > http://savonet.sourceforge.net/doc-svn/stream_content.html > > Anyway, you probably figured it out already, but in case anyone else > comes across this post, thought it would be nice to reply. I wanted to > clarify my own understanding as well. > > On Sat, Sep 27, 2014 at 7:05 PM, Ken Restivo <[email protected]> wrote: >> I vaguely remember finding documentation explaining Liquidsoap's weird >> function signature documentation format, but now I can't find it and my >> Google-fu is failing me. >> >> i.e. how do I translate (([(string*string)])->unit) into something sensible? >> >> In that example, what is a "unit" in example above? I didn't find a type >> called "unit" in the language documentation. And what is a (string*string) >> ... string multiplied by string? String pointer string? >> >> I get that (()->foo) probably means a function that takes no args and >> returns a foo. >> >> I also get that [] probably means a list, so ([])->foo would be a function >> that takes a list as its sole arg. >> >> I think I'm just looking for a detailed documentation of all the notation >> used in function signatures, and I'm pretty sure I saw one somewhere, some >> years ago. >> >> Thanks. >> >> -ken >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >> _______________________________________________ >> Savonet-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/savonet-users > > > > -- > -Tony Miller > github.com/mcfiredrill > @freedrull > freedrool.us > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Savonet-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/savonet-users
------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
