lambdaway
::
bilingue2
7
|
list
|
login
|
load
|
|
{require lib_fren} {uncover https://figurinepop.com/public/agnes1_2.jpg 100 800 Agnes loves the lamb(a)da way.} {center {input {@ id="toggle" type="button" value="english" onclick="toggle(this)"}}} _h1 '{λy}{sup {sup 1}} | [['{λy}{sup {sup 2}}|?view=bilingue3]] _en You are welcome in the '{lambda way} project, a light framework built on a wiki, '{lambda tank}, and a functional programming language, '{lambda talk}. _fr Vous êtes les bienvenus dans le projet '{lambda way}, un cadre léger construit sur un wiki, '{lambda tank}, et un langage de programmation fonctionnelle, '{lambda talk}. _en What can we do with Lambdatalk? Listen, if you ask somebody to compute the square of the number {b 3} he should answer {b 9}. To get a chance to be understood by Lambdatalk you should write this expression _fr Que pouvons-nous faire avec Lambdatalk ? Écoutez, si vous demandez à quelqu'un de calculer le carré du nombre 3, il doit répondre 9. Pour avoir une chance d'être compris par Lambdatalk, vous devez écrire cette expression {pre '{* 3 3} -> {* 3 3} } _en This {i strange parenthesized prefixed} expression says nothing but « please multiply 3 by 3 ». Wonderful isnt'it? Lambdatalk is a kind of {i calculator} coming with a set of commands, operators, functions working on numbers. Lambdatalk can also {i work} on simple words, for instance writing {code '{b {i {u hello world}}}} displays {b {i {u hello world}}}. It's a condensed way to say {i boldify, italicize and underline this sentence "hello world"}. Lambdatalk knows how to enrich text. _fr Cette expression entre parenthèses ne dit rien d'autre que « {i veuillez multiplier 3 par 3} ». Merveilleux, n'est-ce pas ? Lambdatalk est une sorte de {i calculatrice} dotée d'un ensemble de commandes, d'opérateurs, de fonctions travaillant sur les nombres. Lambdatalk peut également {i travailler} sur des mots simples, par exemple écrire {code '{b {i {u hello world}}}} affiche {b {i {u hello world}}}. C'est une façon condensée de dire {u in english} : « {i boldify, italicize and underline this sentence "hello world"} ». Lambdatalk sait comment enrichir le texte. _en And it can do much more. If you ask now « {i tell me the result of this command }» _fr Et il peut faire beaucoup plus. Si vous demandez maintenant " {i dis moi le résultat de cette commande}" {pre {b replace} this word :x {b in} this sentence :x{sup 2} is equal to '{* :x :x} {b by} this word 3 } _en he should probably do what you want and answer « {i 3{sup 2} is equal to {* 3 3}} ». This is the same command written to be understood by Lambdatalk, where the word {b replace} will be replace by {b lambda}, for simple historic reasons _fr il devrait probablement faire ce que vous voulez et répondre " {i 3{sup 2} est égal à {* 3 3}} ». Voici maintenant la même commande écrite pour être comprise par Lambdatalk, où le mot {b replace} sera remplacé par {b lambda}, pour de simples raisons historiques {pre '{{lambda {:x} // replace :x{sup 2} is equal to {* :x :x} // in } 3} // by -> {smart_square 3} } _en It works fine but it's a little {i scary}, isnt'it?. Geeks call such a thing an {b IIFE}, let's forget it. Splitting this command in two steps will make life easier _fr Ça marche bien mais c'est un peu {i effrayant}, non ? Les geeks appellent ce genre de chose une {b IIFE}, oublions-le. Diviser cette commande en deux étapes vous facilitera la vie {pre 1) define: '{def smart_square {lambda {:x} :x{sup 2} is equal to {* :x :x} }} -> {def smart_square {lambda {:x} :x{sup 2} is equal to {* :x :x}}} 2) and call: '{smart_square 3} -> {smart_square 3} '{smart_square 123456789012} -> {smart_square 123456789012} } _en This way you have just defined and named the function {b smart_square} and applied it to a number. You have extended the existing dictionary with a new capability that you will be able to use in the same way you use the {b *} operator. This is called {b programming}! Lambdatalk is not only a text editor and a number calculator but a true programming language opening a door to the exploration of the wonderful algorithmic world. _fr De cette façon, vous venez de définir et de nommer la fonction {b smart_square} et de l'appliquer à un nombre. Vous avez étendu le dictionnaire existant avec une nouvelle fonctionnalité que vous pourrez utiliser de la même manière que vous utilisez l'opérateur {b *}. C'est ce qu'on appelle la {b programmation} ! Lambdatalk n'est pas seulement un éditeur de texte ou une calculatrice mais un véritable langage de programmation ouvrant une porte à l'exploration du merveilleux monde algorithmique. _fr Deux {b sucres syntaxiques, let & if,} vont nous y aider, voyons donc [[comment|?view=bilingue3]]. _en Two {b syntactic sugars, let & if,} will help us, as we are going to see [[here|?view=bilingue3]]. {style body, #page_frame, #page_content, .page_menu { background:#444; color:#fff; border:0; box-shadow:0 0 0; } pre { background:#444; color:#fff; } }
lambdaway v.20211111