mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-27 13:43:28 +03:00
12 lines
264 B
Idris
12 lines
264 B
Idris
module Data.Enumerate.Common
|
|
|
|
import Data.List
|
|
|
|
%default total
|
|
|
|
export
|
|
prodWith : (a -> b -> c) -> List a -> List b -> List c
|
|
prodWith f [] bs = []
|
|
prodWith f as [] = []
|
|
prodWith f (a :: as) (b :: bs) = f a b :: interleave (map (f a) bs) (prodWith f as (b :: bs))
|