mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Adds basic support for the Swift programming language
Text only lexer for now until Pygments catches up
This commit is contained in:
8
samples/Swift/section-83.swift
Normal file
8
samples/Swift/section-83.swift
Normal file
@@ -0,0 +1,8 @@
|
||||
func repeat<ItemType>(item: ItemType, times: Int) -> ItemType[] {
|
||||
var result = ItemType[]()
|
||||
for i in 0..times {
|
||||
result += item
|
||||
}
|
||||
return result
|
||||
}
|
||||
repeat("knock", 4)
|
||||
Reference in New Issue
Block a user