# map_thread 関数

複数のリストの対応する要素に関数を適用します。

## 書き方

### map_thread(f, lists)

**f**

適用する関数。関数を受け取ります。

**lists**

同じ長さのリストのリスト。リストを受け取ります。

## 例題

- $\displaystyle \operatorname{map\_thread}\left(\operatorname{plus}, \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\right) = \left[ 4, 6 \right]$

  `map_thread(plus, [[1, 2], [3, 4]])`

  ソルバーでは、`map_thread(plus, [[1, 2], [3, 4]])` の答えは `[4, 6]` です。

  [ソルバーで開く](https://ja.hilberon.com/?q=map_thread%28plus%2C%20%5B%5B1%2C%202%5D%2C%20%5B3%2C%204%5D%5D%29)

## 関連する関数

- [map](https://ja.hilberon.com/library/map)

  リストの各要素に関数を適用します。
- [thread](https://ja.hilberon.com/library/thread)

  リストの対応する要素に関数を適用します。
- [most](https://ja.hilberon.com/library/most)

  最後の要素を除いたリスト。
- [nest](https://ja.hilberon.com/library/nest)

  ある値に関数を繰り返し適用します。
- [list](https://ja.hilberon.com/library/list)

  引数のリストです。
- [nest_list](https://ja.hilberon.com/library/nest_list)

  nest の途中式：最初の値から始めて各適用後の値。

---
Source: https://ja.hilberon.com/library/map_thread
