Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Closure
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
sub make_counter { my $start = shift; return sub { $start++ } } my $from_ten = make_counter(10); my $from_three = make_counter(3); print $from_ten->(); print "\n"; # 10 print $from_ten->(); print "\n"; # 11 print $from_three->(); print "\n"; # 3 print $from_ten->(); print "\n"; # 12 print $from_three->(); print "\n"; # 4
5 1 2 3 4 5
[
-
]
Show input
Absolute running time: 0.25 sec, cpu time: 0.06 sec, memory peak: 5 Mb, absolute service time: 0,35 sec
edit mode
|
history
|
discussion
Number of values > average is: 2