blob: d8dfa03d30b3f987b9efe284aa23fc7b587e0712 (
plain) (
tree)
|
|
<html xmlns="http://www.w3.org/1999/xhtml"
><head
><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
/><meta name="viewport" content="width=device-width, initial-scale=1"
/><title
>Examples</title
><link href="#" rel="stylesheet" type="text/css" title="NewOcean"
/><link rel="stylesheet" type="text/css" href="#"
/><link rel="stylesheet" type="text/css" href="#"
/><script src="haddock-bundle.min.js" async="async" type="text/javascript"
></script
><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"
></script
></head
><body
><div id="package-header"
><span class="caption empty"
></span
><ul class="links" id="page-menu"
><li
><a href="#"
>Contents</a
></li
><li
><a href="#"
>Index</a
></li
></ul
></div
><div id="content"
><div id="module-header"
><table class="info"
><tr
><th
>Safe Haskell</th
><td
>Safe</td
></tr
></table
><p class="caption"
>Examples</p
></div
><div id="synopsis"
><details id="syn"
><summary
>Synopsis</summary
><ul class="details-toggle" data-details-id="syn"
><li class="src short"
><a href="#"
>fib</a
> :: <a href="#" title="Prelude"
>Integer</a
> -> <a href="#" title="Prelude"
>Integer</a
></li
></ul
></details
></div
><div id="interface"
><h1
>Documentation</h1
><div class="top"
><p class="src"
><a id="v:fib" class="def"
>fib</a
> :: <a href="#" title="Prelude"
>Integer</a
> -> <a href="#" title="Prelude"
>Integer</a
> <a href="#" class="selflink"
>#</a
></p
><div class="doc"
><p
>Fibonacci number of given <code
><a href="#" title="Prelude"
>Integer</a
></code
>.</p
><p
>Examples:</p
><pre class="screen"
><code class="prompt"
>>>> </code
><strong class="userinput"
><code
>fib 5
</code
></strong
>5
<code class="prompt"
>>>> </code
><strong class="userinput"
><code
>fib 10
</code
></strong
>55
</pre
><pre class="screen"
><code class="prompt"
>>>> </code
><strong class="userinput"
><code
>fib 10
</code
></strong
>55
</pre
><p
>One more Example:</p
><pre class="screen"
><code class="prompt"
>>>> </code
><strong class="userinput"
><code
>fib 5
</code
></strong
>5
</pre
><p
>One more Example:</p
><pre class="screen"
><code class="prompt"
>>>> </code
><strong class="userinput"
><code
>fib 5
</code
></strong
>5
</pre
><p
>Example with an import:</p
><pre class="screen"
><code class="prompt"
>>>> </code
><strong class="userinput"
><code
>import Data.Char
</code
></strong
><code class="prompt"
>>>> </code
><strong class="userinput"
><code
>isSpace 'a'
</code
></strong
>False
</pre
><pre class="screen"
><code class="prompt"
>>>> </code
><strong class="userinput"
><code
>putStrLn "foo\n\nbar"
</code
></strong
>foo
bar
</pre
></div
></div
></div
></div
><div id="footer"
></div
></body
></html
>
|