Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cycle

  • Loading branch information...
commit 26cbe14e377347713cf3e53a9f7f47c3c5901206 1 parent 8f1592f
seni authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/Copilot/Library/Utils.hs
View
7 src/Copilot/Library/Utils.hs
@@ -5,7 +5,7 @@ module Copilot.Library.Utils
import Copilot.Language
-import Copilot.Language.Prelude hiding ( take, (!!) )
+import Copilot.Language.Prelude hiding ( take, (!!), cycle )
import qualified Prelude as P
@@ -103,3 +103,8 @@ ls !! n = let indices = map
error "indexing the empty list with !! is not defined"
else
select indices ls
+
+
+cycle :: ( Typed a ) => [ a ] -> Stream a
+cycle ls = cycle'
+ where cycle' = ls ++ cycle'
Please sign in to comment.
Something went wrong with that request. Please try again.