This language bar is your friend. Select your favorite languages!
Select your favorite languages :
- Or search :
- Ada
- C
- C
- Clojure
- Cobol
- C++
- C#
- D
- Dart
- Elixir
- Erlang
- Fortran
- Go
- Go
- Haskell
- JS
- Java
- Java
- Lisp
- Lua
- Obj-C
- PHP
- Pascal
- Pascal
- Perl
- Python
- Python
- Ruby
- Rust
- Rust
- Scala
- Smalltalk
- VB
(loop []
(do something)
(when c
(recur)))
The first argument to loop can be used to define variables which are scoped to the loop. Values passed to recur are used for the next iteration.
do_while(Block, C) ->
case C(Block()) of
true -> do_while(Block, C);
false -> ok
end.
I'm assuming that C (the condition) has something to do with what happens on Block, therefore C is a predicate with one argument