From f76de1ab8145671ac7a051cd7f3fea70256da69d Mon Sep 17 00:00:00 2001 From: Phil Rzewski Date: Fri, 3 Nov 2023 15:27:32 -0700 Subject: [PATCH 1/2] Minor fixes to map function doc --- docs/language/functions/map.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/language/functions/map.md b/docs/language/functions/map.md index 2e194a2019..063450fcfc 100644 --- a/docs/language/functions/map.md +++ b/docs/language/functions/map.md @@ -10,9 +10,9 @@ map(v: array|set, f: function) -> array|set ### Description -The _map_ function applies function f to every element in array or set v and -returns an array or set of the results. Function f must be a function that takes -only one argument. A user defined function can be used for f. +The _map_ function applies function `f` to every element in array or set `v` and +returns an array or set of the results. Function `f` must be a function that takes +only one argument. A [user-defined function](../statements.md#func-statements) can be used for `f`. ### Examples @@ -26,7 +26,7 @@ echo '["foo","bar","baz"]' | zq -z 'yield map(this, upper)' - ["FOO","BAR","BAZ"] ``` -Using a user defined function to convert an epoch float to a time: +Using a user-defined function to convert an epoch float to a time: ```mdtest-command echo '[1697151533.41415,1697151540.716529]' | zq -z ' From a0d07f167055a02f8898544962c05d1628ccda89 Mon Sep 17 00:00:00 2001 From: Phil Rzewski Date: Sat, 4 Nov 2023 13:15:13 -0700 Subject: [PATCH 2/2] PR feedback: Reorder sentence Co-authored-by: Noah Treuhaft --- docs/language/functions/map.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/language/functions/map.md b/docs/language/functions/map.md index 063450fcfc..39b2f5b8a7 100644 --- a/docs/language/functions/map.md +++ b/docs/language/functions/map.md @@ -12,7 +12,7 @@ map(v: array|set, f: function) -> array|set The _map_ function applies function `f` to every element in array or set `v` and returns an array or set of the results. Function `f` must be a function that takes -only one argument. A [user-defined function](../statements.md#func-statements) can be used for `f`. +only one argument. `f` may be a [user-defined function](../statements.md#func-statements). ### Examples