<p>接受函数为参数,means the accepted/gotten function is parametar, and the returned value is function.</p>

CC BY-SA 4.0
2018-08-02T12:54:20.493Z
2018-08-02T12:54:20.493Z
XL _At_Here_There
<p>To Augment the other answer: 为 is a verb when it's pronounced as <strong>wéi</strong>, and a prep as <strong>wèi</strong>. </p>

<p>You interpreted 为 as "<strong>is</strong>" in this context is fine. However, your translation does have some issues: </p>

<blockquote>
  <p>接受函数为参数，返回值为函数: <em>Gets function as parameter, return value is function</em>.</p>
</blockquote>

<p>First, 接受函数 as a noun phrase should be translated as <strong>acceptance function</strong> unless you meant "<strong>gets</strong>" in "<strong>gets function</strong>" is a nominal usage(but I figure you meant it's a verb "<strong>get</strong>".). Second, you need some articles <strong>a or the</strong> in your English sentence. </p>

<p>So the whole translation can be: </p>

<blockquote>
  <p><em>The acceptance function is the parameter, and the return value is a function.</em> </p>
</blockquote>

CC BY-SA 4.0
2018-07-30T05:38:58.200Z
@songyuanyao, I figure from the limited context it means the function is used for the acceptance/receive purpose. So, 接受函数为参数 means it takes the whole 接受函数 as its parameter.
dan
CC BY-SA 4.0
2018-07-30T05:21:22.830Z
2018-07-30T05:27:48.903Z
2018-07-30T05:27:48.903Z
dan
<blockquote>
  <p>接受函数为参数，返回值为函数</p>
</blockquote>

<p>I can vaguely translate this as </p>

<blockquote>
  <p>Gets function as parameter, return value is function.</p>
</blockquote>

<p>but that's only due to my domain knowledge. I am confused by the use of 为 here. The only 为 I know is when I want to say for someone or something such as</p>

<blockquote>
  <p>汉语水平考试是一个考试为了外国人。(HSK is a test for foreigners) - I am not quite sure if it's grammatically correct to append 为 at the very end as such. </p>
</blockquote>

CC BY-SA 4.0
2018-07-30T03:58:13.037Z
为 has two pronunciations and quite a lot of meanings ... Have you tried a dictionary?
fefe
CC BY-SA 4.0
2018-07-30T04:06:02.300Z
@fefe For sure I have, but as you have mentioned, it does come with quite a lot of meanings that are hard to distinguish because of the subtleties they each carry. For example, 为 can mean become or for. These meanings can all fit into that sentence without much problem and I hope you get what I mean. I want a native point of view. I also wanted to test out my previous understanding of 为 and see if it's correct.
金允雄Oliver
<grammar><usage>
Encountered usage of 为
# Encountered usage of 为

(Asked by: username_0 on 2018-07-30)

> 接受函数为参数，返回值为函数

I can vaguely translate this as

> Gets function as parameter, return value is function.

but that's only due to my domain knowledge. I am confused by the use of 为 here. The only 为 I know is when I want to say for someone or something such as

> 汉语水平考试是一个考试为了外国人。(HSK is a test for foreigners) - I am not quite sure if it's grammatically correct to append 为 at the very end as such.

**Tags:** grammar, usage

> **Comments:**
> **username_1**: 为 has two pronunciations and quite a lot of meanings ... Have you tried a dictionary?  
> **username_0**: @username_1 For sure I have, but as you have mentioned, it does come with quite a lot of meanings that are hard to distinguish because of the subtleties they each carry. For example, 为 can mean become or for. These meanings can all fit into that sentence without much problem and I hope you get what I mean. I want a native point of view. I also wanted to test out my previous understanding of 为 and see if it's correct.  

---

## 2 answers

### Answer by username_2 on 2018-08-02. Score: 0

接受函数为参数,means the accepted/gotten function is parametar, and the returned value is function.


---

### Answer by username_3 on 2018-07-30. Score: 0

To Augment the other answer: 为 is a verb when it's pronounced as **wéi**, and a prep as **wèi**.

You interpreted 为 as "**is**" in this context is fine. However, your translation does have some issues:

> 接受函数为参数，返回值为函数: *Gets function as parameter, return value is function*.

First, 接受函数 as a noun phrase should be translated as **acceptance function** unless you meant "**gets**" in "**gets function**" is a nominal usage(but I figure you meant it's a verb "**get**".). Second, you need some articles **a or the** in your English sentence.

So the whole translation can be:

> *The acceptance function is the parameter, and the return value is a function.*

> **Comments:**
> **username_3**: @songyuanyao, I figure from the limited context it means the function is used for the acceptance/receive purpose. So, 接受函数为参数 means it takes the whole 接受函数 as its parameter.  

---

