From e0e0ca854923768b0946c1b4ef55935a16587c67 Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Tue, 26 Jan 2016 11:29:06 +0100 Subject: [PATCH] Fix broken and incomplete examples --- examples/features/approximators.shape | 2 ++ examples/features/fgraphs.shape | 16 ++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/examples/features/approximators.shape b/examples/features/approximators.shape index b408d112..3a6fa7a8 100644 --- a/examples/features/approximators.shape +++ b/examples/features/approximators.shape @@ -43,6 +43,8 @@ } randPath: \ n •rand → + @defaultunit:1%C + | [[Data..range '1 n].foldsl \ pile e •randstate → pile--( ^ )<(1cm*[ball2D •randstate])>( 2mm * (1+[ball1D •randstate]) ^ 180°*[ball1D •randstate] ) Geometry..emptypath diff --git a/examples/features/fgraphs.shape b/examples/features/fgraphs.shape index dea3c9bb..ceab9bbc 100644 --- a/examples/features/fgraphs.shape +++ b/examples/features/fgraphs.shape @@ -26,12 +26,16 @@ ** language to support the creation of mutually recursive functions. **/ +##lookin ..Shapes +##lookin ..Shapes..Control +##lookin ..Shapes..Data + g: { - a: \ → [vector b] - b: \ → [vector c d] - c: \ → [vector a] - d: \ → [vector] + a: \ → (> value: `A´ out_neighbors: [vector b] <) + b: \ → (> value: `B´ out_neighbors: [vector c d] <) + c: \ → (> value: `C´ out_neighbors: [vector a] <) + d: \ → (> value: `D´ out_neighbors: [vector] <) [vector a b c d] } @@ -48,6 +52,6 @@ traverse: \ node depth → `´ ] -•stdout << [traverse [g '0] '7] << "{n} +IO..•stdout << [traverse [g '0] '7] << "{n} -@spot +Graphics..@spot -- 2.11.4.GIT