From 8b9f1750c74c7d3cca99d6949a90cd61eb8e0218 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 13 Jul 2015 20:50:25 -0700 Subject: 1777 - consistent terminology: 'product' --- 034call.cc | 2 +- 036call_reply.cc | 4 ++-- 064random.cc | 2 +- Readme.md | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/034call.cc b/034call.cc index bb0b6067..4b841fe0 100644 --- a/034call.cc +++ b/034call.cc @@ -113,7 +113,7 @@ while (current_step_index() >= SIZE(Current_routine->steps())) { Current_routine->calls.pop_front(); if (Current_routine->calls.empty()) return; // Complete Call Fallthrough - // todo: no results returned warning + // todo: no products returned warning ++current_step_index(); } diff --git a/036call_reply.cc b/036call_reply.cc index bd7a4928..22eeea79 100644 --- a/036call_reply.cc +++ b/036call_reply.cc @@ -30,7 +30,7 @@ case REPLY: { // just in case 'main' returns a value, drop it for now if (Current_routine->calls.empty()) goto stop_running_current_routine; const instruction& caller_instruction = current_instruction(); - // make reply results available to caller + // make reply products available to caller copy(ingredients.begin(), ingredients.end(), inserter(products, products.begin())); // check that any reply ingredients with /same-as-ingredient connect up // the corresponding ingredient and product in the caller. @@ -71,7 +71,7 @@ recipe f [ //: In mu we'd like to assume that any instruction doesn't modify its //: ingredients unless they're also products. The /same-as-ingredient inside //: the recipe's 'reply' will help catch accidental misuse of such -//: 'ingredient-results' (sometimes called in-out parameters in other languages). +//: 'ingredient-products' (sometimes called in-out parameters in other languages). :(scenario reply_same_as_ingredient) % Hide_warnings = true; diff --git a/064random.cc b/064random.cc index 05fa2863..6fadeb40 100644 --- a/064random.cc +++ b/064random.cc @@ -5,7 +5,7 @@ Recipe_ordinal["random"] = RANDOM; :(before "End Primitive Recipe Implementations") case RANDOM: { // todo: limited range of numbers, might be imperfectly random - // todo: thread state in extra ingredients and results + // todo: thread state in extra ingredients and products products.resize(1); products.at(0).push_back(rand()); break; diff --git a/Readme.md b/Readme.md index 91218f85..f8f1062c 100644 --- a/Readme.md +++ b/Readme.md @@ -82,14 +82,14 @@ As a sneak peek, here's how you compute factorial in Mu: ![code example](html/factorial.png) Mu functions or 'recipes' are lists of instructions, one to a line. Each -instruction operates on some *ingredients* and returns some *results*. +instruction operates on some *ingredients* and returns some *products*. ``` - [results] <- instruction [ingredients] + [products] <- instruction [ingredients] ``` Result and ingredient *reagents* have to be variables. But you can have any -number of them. In particular you can have any number of results. For example, +number of them. In particular you can have any number of products. For example, you can perform integer division as follows: ``` @@ -105,7 +105,7 @@ can be multiple words, like: ``` Recipes load their ingredients from their caller using the *next-ingredient* -instruction, and return results using *reply*. +instruction, and return products using *reply*. Try out the factorial program now: @@ -226,7 +226,7 @@ system permits and forces them to use, you'll learn to create new checks that make sense for your specific program. If it makes sense to perform different checks in different parts of your program, you'll be able to do that. -To summarize: Mu instructions have multiple ingredient and result reagents. +To summarize: Mu instructions have multiple ingredient and product reagents. Values can have multiple rows separated by slashes, and rows can have multiple columns separated by colons. The address of a reagent is always in the very first column of the first row of its 'table'. You can visualize the last -- cgit 1.4.1-2-gfad0