Conversation
|
@copilot foo -- (list: a[], anotherArg1: Bar1, anotherArg2: Bar2): Bazto ---@generic A
---@param another_arg1 Bar1
---@param another_arg2 Bar2
---@return fun(xs: A[]): Baz
function M.foo(another_arg1, another_arg2)
return function(xs)
return -- ...
end
endbecause usage is local list = require('luarrow.utils.list')
local _ = xs
% arrow(list.foo(a, b)) |
... Done! All functions with additional arguments are now curried as requested. Usage is now: local _ = xs % arrow(list.map(function(x) return x + 10 end))No more wrapper functions needed. See commit 3263017. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot |
There was a problem hiding this comment.
Pull request overview
This PR implements a comprehensive list manipulation module (luarrow.utils.list) with 28 functional programming utilities (25 unique functions + 3 aliases) that enable pipeline-style data transformations using luarrow's arrow composition. The key innovation is the curried API design where functions with additional arguments return functions that accept the list, enabling direct use in arrow pipelines without wrapper functions.
Changes:
- Added
luarrow.utils.listmodule with map, filter, fold operations, aggregations, transformations, and search utilities - Integrated list module into main luarrow exports under utils.list
- Implemented comprehensive test suite with 417 test cases covering all functions and edge cases
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| luarrow.lua/src/luarrow/utils/list.lua | Core implementation of 25 list manipulation functions with curried API and LuaCATS type annotations |
| spec/luarrow/utils/list_spec.lua | Comprehensive test suite with describe/it blocks testing all functions, edge cases, and arrow integration |
| luarrow.lua/src/luarrow.lua | Integration of list module into main luarrow exports under utils namespace |
Done in commit 01c1553:
|
|
@copilot I would like to resolve the conflict, so could you please submit a sub-PR to resolve the conflict? |
Unfortunately I cannot create sub-PRs or push to branches other than this one — that's outside my permissions. The good news is that the conflict is already resolved: @aiya000's direct edits on GitHub (commits |
@copilot |
... Done in commit I resolved it by porting all the list module changes to
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…ey errors in api.md Co-authored-by: aiya000 <4897842+aiya000@users.noreply.github.com>
Done in commit
|
|
@copilot apply changes based on the comments in this thread |
…with bullet Co-authored-by: aiya000 <4897842+aiya000@users.noreply.github.com>
Done in commit
|
|
@copilot |
Co-authored-by: aiya000 <4897842+aiya000@users.noreply.github.com>
Found one broken link (commit
All other links checked out:
|
…, minimum Co-authored-by: aiya000 <4897842+aiya000@users.noreply.github.com>
sort_by(key)andsort_with(cmp)are truly separate functionsunique_by(f)— deduplicate tables by a derived keydoc/api.md— separatesort_by/sort_withsections,unique_byentrydoc/examples.md— correct heading levelluarrow.let,luarrow.utils,luarrow.utils.listunique_by,group_by,sort_by: nil-key validation with clear errorserror()calls now useerror(..., 2)for caller-focused stacktracesfoldl1: empty-list error now uses level 2foldr1: empty-list error now uses level 2maximum: empty-list error now uses level 2minimum: empty-list error now uses level 2Original prompt
Note
Custom agent used: PR Creator Agent
An agent creates PullRequests when assigned to an issue
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.