88 lines
3.6 KiB
HTML
88 lines
3.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<!-- This manual documents Guile version 3.0.10.
|
|
|
|
Copyright (C) 1996-1997, 2000-2005, 2009-2023 Free Software Foundation,
|
|
Inc.
|
|
|
|
Copyright (C) 2021 Maxime Devos
|
|
|
|
Copyright (C) 2024 Tomas Volf
|
|
|
|
|
|
Permission is granted to copy, distribute and/or modify this document
|
|
under the terms of the GNU Free Documentation License, Version 1.3 or
|
|
any later version published by the Free Software Foundation; with no
|
|
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
|
|
copy of the license is included in the section entitled "GNU Free
|
|
Documentation License." -->
|
|
<title>The REPL (Guile Reference Manual)</title>
|
|
|
|
<meta name="description" content="The REPL (Guile Reference Manual)">
|
|
<meta name="keywords" content="The REPL (Guile Reference Manual)">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content=".texi2any-real">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
|
|
<link href="index.html" rel="start" title="Top">
|
|
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
|
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
|
<link href="About-Expressions.html" rel="up" title="About Expressions">
|
|
<link href="Syntax-Summary.html" rel="next" title="Syntax Summary">
|
|
<link href="Tail-Calls.html" rel="prev" title="Tail Calls">
|
|
<style type="text/css">
|
|
<!--
|
|
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
|
|
div.example {margin-left: 3.2em}
|
|
span:hover a.copiable-link {visibility: visible}
|
|
-->
|
|
</style>
|
|
<link rel="stylesheet" type="text/css" href="https://www.gnu.org/software/gnulib/manual.css">
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en">
|
|
<div class="subsection-level-extent" id="The-REPL">
|
|
<div class="nav-panel">
|
|
<p>
|
|
Next: <a href="Syntax-Summary.html" accesskey="n" rel="next">Summary of Common Syntax</a>, Previous: <a href="Tail-Calls.html" accesskey="p" rel="prev">Tail calls</a>, Up: <a href="About-Expressions.html" accesskey="u" rel="up">Expressions and Evaluation</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
<hr>
|
|
<h4 class="subsection" id="Using-the-Guile-REPL"><span>3.3.3 Using the Guile REPL<a class="copiable-link" href="#Using-the-Guile-REPL"> ¶</a></span></h4>
|
|
|
|
<p>If you start Guile without specifying a particular program for it to
|
|
execute, Guile enters its standard Read Evaluate Print Loop — or
|
|
<em class="dfn">REPL</em> for short. In this mode, Guile repeatedly reads in the next
|
|
Scheme expression that the user types, evaluates it, and prints the
|
|
resulting value.
|
|
</p>
|
|
<p>The REPL is a useful mechanism for exploring the evaluation behavior
|
|
described in the previous subsection. If you type <code class="code">string-append</code>,
|
|
for example, the REPL replies <code class="code">#<primitive-procedure
|
|
string-append></code>, illustrating the relationship between the variable
|
|
<code class="code">string-append</code> and the procedure value stored in that variable.
|
|
</p>
|
|
<p>In this manual, the notation ⇒ is used to mean “evaluates
|
|
to”. Wherever you see an example of the form
|
|
</p>
|
|
<div class="example lisp">
|
|
<pre class="lisp-preformatted"><var class="var">expression</var>
|
|
⇒
|
|
<var class="var">result</var>
|
|
</pre></div>
|
|
|
|
<p>feel free to try it out yourself by typing <var class="var">expression</var> into the
|
|
REPL and checking that it gives the expected <var class="var">result</var>.
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|