Hee you can define function using both syntax
function foo()
{
…
…
}
OR
foo()
{
…
…
}
As far as this example concerns it is working I just cross checked. Just look at
http://www.freeos.com/guides/lsst/ch04sec5.html it got examples of both syntax. May be Cygwin's bash version could be problem but i'm not sure never used Cygwin