From 1ead356219bb2eb59487d1012f837bd07ec336f5 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 8 Mar 2016 01:30:14 -0800 Subject: 2735 - define recipes using 'def' I'm dropping all mention of 'recipe' terminology from the Readme. That way I hope to avoid further bike-shedding discussions while I very slowly decide on the right terminology with my students. I could be smarter in my error messages and use 'recipe' when code uses it and 'function' otherwise. But what about other words like ingredient? It would all add complexity that I'm not yet sure is worthwhile. But I do want separate experiences for veteran programmers reading about Mu on github and for people learning programming using Mu. --- edit/006-sandbox-edit.mu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'edit/006-sandbox-edit.mu') diff --git a/edit/006-sandbox-edit.mu b/edit/006-sandbox-edit.mu index de4be675..7354d60b 100644 --- a/edit/006-sandbox-edit.mu +++ b/edit/006-sandbox-edit.mu @@ -92,7 +92,7 @@ after [ } ] -recipe empty-editor? editor:address:shared:editor-data -> result:boolean [ +def empty-editor? editor:address:shared:editor-data -> result:boolean [ local-scope load-ingredients head:address:shared:duplex-list:character <- get *editor, data:offset @@ -100,13 +100,13 @@ recipe empty-editor? editor:address:shared:editor-data -> result:boolean [ result <- not first ] -recipe extract-sandbox env:address:shared:programming-environment-data, click-row:number -> result:address:shared:sandbox-data, env:address:shared:programming-environment-data [ +def extract-sandbox env:address:shared:programming-environment-data, click-row:number -> result:address:shared:sandbox-data, env:address:shared:programming-environment-data [ local-scope load-ingredients sandbox:address:address:shared:sandbox-data <- get-address *env, sandbox:offset start:number <- get **sandbox, starting-row-on-screen:offset in-editor?:boolean <- lesser-than click-row, start - reply-if in-editor?, 0 + return-if in-editor?, 0 { next-sandbox:address:shared:sandbox-data <- get **sandbox, next-sandbox:offset break-unless next-sandbox -- cgit 1.4.1-2-gfad0