Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
13df8fc2
Commit
13df8fc2
authored
3 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Discuss rapidly the pure function-like behavior of pugs functions
parent
8be5cd74
No related branches found
No related tags found
1 merge request
!145
git subrepo clone git@gitlab.com:OlMon/org-themes.git packages/org-themes
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/userdoc.org
+13
-0
13 additions, 0 deletions
doc/userdoc.org
with
13 additions
and
0 deletions
doc/userdoc.org
+
13
−
0
View file @
13df8fc2
...
...
@@ -2078,6 +2078,19 @@ or if ~(y1,...,ym)~ has already been defined in ~Y1*...*Ym~
*** Pure functions
In the ~pugs~ language, functions are *pure functions* in the sense that
arguments given to the function are *never* modified by the
functions. They act as operators.
#+BEGIN_note
Actually these functions are not strictly /pure functions/ in the
computer science context. The reason for that is that they can
eventually have side effects. A good example for that, is that it is
possible to modify the random seed used by the code the code. In that
case, the modified value is not a variable of the language itself but
the internal random seed itself.
#+END_note
*** TODO Implicit type conversion for parameters and returned values
*** TODO User-defined functions
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment