-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
map4
#27
Comments
ChatGPT has these insights for you:
|
It even created the code for you, but seems like it ran out of patience for the last one: // Working with 4 enumerable collections at once without proper functions is tedious.
// FSharp.Core.Collections provides mapping functions for one, two, and three collections, yet a mapping function for four is missing.
let map4 f (a1: _[]) (a2: _[]) (a3: _[]) (a4: _[]) =
Array.init (Array.length a1) (fun i -> f a1.[i] a2.[i] a3.[i] a4.[i])
// Working with 5 enumerable collections simultaneously without proper functions is a nightmare.
// FSharp.Core.Collections' mapping functions for one through four collections aren't enough to make this task any easier.
let map5 f (a1: _[]) (a2: _[]) (a3: _[]) (a4: _[]) (a5: _[]) =
Array.init (Array.length a1) (fun i -> f a1.[i] a2.[i] a3.[i] a4.[i] a5.[i])
// Attempting to work with 6 enumerable collections without a proper function is like trying to juggle six flaming swords.
// We need a mapping function for six collections, and we need it yesterday!
let map6 f (a1: _[]) (a2: _[]) (a3: _[]) (a4: _[]) (a5: _[]) (a6: _[]) =
Array.init (Array.length a1) (fun i -> f a1.[i] a2.[i] a3.[i] a4.[i] a5.[i] a6.[i])
// Working with 7 enumerable collections at once is like trying to solve a Rubik's Cube blindfolded.
// We need a mapping function for seven collections, and we need it now!
let map7 f (a1: _[]) (a2: _[]) (a3: _[]) (a4: _[]) (a5: _[]) (a6: _[]) (a7: _[]) =
Array.init (Array.length a1) (fun i -> f a1.[i] a2.[i] a3.[i] a4.[i] a5.[i] a6.[i] a7.[i])
// Working with 8 enumerable collections at once is like trying to herd eight cats.
// FSharp.Core.Collections' mapping functions for one through seven collections are no match for this task.
// We need a mapping function for eight collections, and we need it fast!
let map8 f (a1: _[]) (a2: _[]) (a3: _[]) (a4: _[]) (a5: _[]) (a6: _[]) (a7: _[]) (a8: _[]) =
Array.init (Array.length a1) (fun i -> f a1.[i] a2.[i] a3.[i] a4.[i] a5.[i] a6.[i] a7.[i] a8.[i])
// Working with 9 enumerable collections at once is like trying to perform brain surgery while skydiving.
// FSharp.Core.Collections' mapping functions for one through eight collections are simply not enough to make this task manageable.
// We need a mapping function for nine collections, and we need it yesterday!
let map9 f (a1: _[]) (a2: _[]) (a3: _[]) (a4: _[]) (a5: _[])
|
Description
It is tedious to work with 4 enumerable collections (i.e., seqs, arrays, lists) at once without proper functions.
FSharp.Core.Collections
already provides mapping functions for one, two, or three collections, yet a mapping function for four is missing.The text was updated successfully, but these errors were encountered: