From ebd2ab3901d2dd13a03e612ea0ec7861342b647c Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Sat, 26 Sep 2009 13:42:30 +0200 Subject: [PATCH] New example: Showing crazy use of dynamic bindings and dynamic expressions. --- examples/misc/crazy.shape | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 examples/misc/crazy.shape diff --git a/examples/misc/crazy.shape b/examples/misc/crazy.shape new file mode 100644 index 00000000..7685ef2c --- /dev/null +++ b/examples/misc/crazy.shape @@ -0,0 +1,25 @@ +/** This file is part of Shapes. + ** + ** Shapes is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** any later version. + ** + ** Shapes is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Shapes. If not, see . + ** + ** Copyright 2009 Henrik Tidefelt + **/ + +/** This example shows that dynamic bindings and dynamic expressions can become quite complicated. + **/ + +dynamic @c identity 1 +fun: \ a b → a + b + @c +•stdout << ( ( \ x → @c:(x|2*@c) ) [] @c:4 ) | [fun 1 2] +[spot (0m,0m)] -- 2.11.4.GIT