


{"id":398696,"date":"2024-12-29T12:39:46","date_gmt":"2024-12-29T12:39:46","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-use-as-input-operator-of-iteratoreg-map\/"},"modified":"2025-01-03T14:05:39","modified_gmt":"2025-01-03T14:05:39","slug":"how-to-use-as-input-operator-of-iteratoreg-map","status":"answered","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-use-as-input-operator-of-iteratoreg-map\/","title":{"rendered":"How to use `$@$` as input operator of iterator(e.g. map)?"},"content":{"rendered":"<p>&lt;p&gt;&lt;div&gt;Some predefined operator can be used as input operator of iterator. Such as the following example&nbsp;&lt;\/div&gt;&lt;div&gt;&nbsp;&lt;\/div&gt;&lt;div&gt;<code><\/code><code>&lt;\/p&gt;&lt;div&gt;function test(a,b: int8 ^ 3) returns (c: int8 ^ 3)&lt;\/div&gt;&lt;div&gt;&amp;nbsp; c = (map $+$ &lt;&lt; 3 &gt;&gt;) (a, b);&amp;nbsp;&lt;\/div&gt;&lt;div&gt;<\/code><code><\/code>&lt;\/div&gt;&lt;div&gt;&nbsp;&lt;\/div&gt;&lt;div&gt;But I am trying to figure out how to use <code>$@$<\/code> as input operator correctly. In the following program:&nbsp;&nbsp;&lt;\/div&gt;&lt;div&gt;&nbsp;&lt;\/div&gt;&lt;div&gt;<code><\/code><code>&lt;\/div&gt;&lt;div&gt;function mapOp(arr1,arr2: int8 ^ 2 ^ 3) returns (oarr: int8 ^ 4 ^ 3)&lt;\/div&gt;&lt;div&gt;let&lt;\/div&gt;&lt;div&gt;&amp;nbsp; oarr = (map $@$ &lt;&lt;3&gt;&gt;) (arr1,arr2);&lt;\/div&gt;&lt;div&gt;tel&amp;nbsp;&lt;\/div&gt;&lt;div&gt;<\/code><code><\/code>&lt;\/div&gt;&lt;div&gt;&nbsp;&lt;\/div&gt;&lt;div&gt;The intention of the above program is to concatenate each element of type <code>int8^2<\/code> in arr1 and arr2 to value of type <code>int8^4<\/code>. But I got the following error:&lt;\/div&gt;&lt;div&gt;<code><\/code><code>&lt;\/div&gt;&lt;div&gt;Prefix operator $@$ expects 2 size parameters but is here used with 0&lt;\/div&gt;&lt;div&gt;<\/code><code><\/code>&lt;\/div&gt;&lt;div&gt;&nbsp;&lt;\/div&gt;&lt;div&gt;How to use <code>$@$<\/code> as input operator of iterator in a correct way?&nbsp;&lt;\/div&gt;&lt;\/div&gt;<\/p>\n","protected":false},"template":"","class_list":["post-398696","topic","type-topic","status-answered","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_forum_id":["27795"],"_bbp_topic_id":["398696"],"_bbp_subscription":["112511","397"],"_bbp_author_ip":["185.36.194.10"],"_bbp_last_reply_id":["403387"],"_bbp_last_active_id":["403387"],"_bbp_last_active_time":["2025-01-03 14:04:18"],"_bbp_reply_count":["2"],"_bbp_reply_count_hidden":["0"],"_bbp_voice_count":["2"],"_bbp_engagement":["112511","397"],"_btv_view_count":["300"],"_bbp_topic_status":["answered"],"_edit_last":["112511"],"_bbp_revision_log":["a:1:{i:398697;a:2:{s:6:\"author\";i:112511;s:6:\"reason\";s:0:\"\";}}"],"_bbp_likes_count":["1"]},"test":"fdtsaidgmail-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/398696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/398696\/revisions"}],"predecessor-version":[{"id":398697,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/398696\/revisions\/398697"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=398696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}