This website requires JavaScript.
Explore
Help
Register
Sign in
aparler
/
RosettaCodeData
Watch
1
Star
0
Fork
You've already forked RosettaCodeData
0
Code
Issues
12
Pull requests
3
Projects
Releases
Packages
Wiki
Activity
Actions
master
RosettaCodeData
/
Task
/
Factorial
/
Swift
/
factorial-2.swift
4 lines
77 B
Swift
Raw
Permalink
Normal View
History
Unescape
Escape
September 2017 Update
2017-09-23 10:01:46 +02:00
func
factorial
(
_
n
:
Int
)
->
Int
{
return
n
<
2
?
1
:
n
*
factorial
(
n
-
1
)
Add tasks for all the new languages
2016-12-05 23:44:36 +01:00
}
Reference in a new issue
Copy permalink