Reverse a string: Difference between revisions
Content deleted Content added
m →{{header|Lua}}: use recommended examples |
|||
Line 272: | Line 272: | ||
=={{header|Agda}}== |
=={{header|Agda}}== |
||
Using the Agda standard library, version |
Using the Agda standard library, version 1.7 . |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="agda"> |
||
module ReverseString where |
|||
open import Data.String |
open import Data.String using (String ; fromList ; toList) |
||
open import Data.List |
open import Data.List using (reverse) |
||
reverse-string : String → String |
|||
reverse-string s = fromList (reverse (toList s)) |
|||
</syntaxhighlight> |
|||
=={{header|Aime}}== |
=={{header|Aime}}== |