Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
idris
scratch
Commits
94acccf2
Commit
94acccf2
authored
2 years ago
by
locallycompact
Browse files
Options
Download
Email Patches
Plain Diff
Add rtraverse
parent
c6810158
master
No related merge requests found
Pipeline
#1248
passed with stages
in 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/Scratch/Record.idr
src/Scratch/Record.idr
+5
-0
No files found.
src/Scratch/Record.idr
View file @
94acccf2
...
...
@@ -31,3 +31,8 @@ export
rmap : (forall x. f x -> g x) -> Rec f xs -> Rec g xs
rmap h Nil = Nil
rmap h (x :: xs) = h x :: rmap h xs
export
rtraverse : Applicative h => (forall x. f x -> (h . g) x) -> Rec f xs -> h (Rec g xs)
rtraverse _ Nil = pure Nil
rtraverse f (x :: xs) = (::) <$> f x <*> rtraverse f xs
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help