---
title: "Discussion on \"Swift - Passing a function into a function parameters and Closures\" | Hashnode"
description: "Discussion on \"Swift - Passing a function into a function parameters and Closures\". How do we pass in a function into another function?\nLet say there is a calculator function, which will perform addition function.\nFor example, let have a calculator function that take in 2 Int param, and output an Int.\nfunc calculator(num1:Int, num2:..."
url: "https://hashnode.com/posts/swift-passing-a-function-into-a-function-parameters-and-closures/62b2aa3d0572b078ae517d79"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Swift - Passing a function into a function parameters and Closures](https://yipcode.hashnode.dev/swift-passing-a-function-into-a-function-parameters-and-closures?utm_source=hashnode&utm_medium=feed)

How do we pass in a function into another function? Let say there is a calculator function, which will perform addition function. For example, let have a calculator function that take in 2 Int param, and output an Int. func calculator(num1:Int, num2:...

Jun 22, 2022 · 2 min read · yipcode.hashnode.dev  
Read the article

-   [#swift](https://hashnode.com/tag/swift)
-   [#closure](https://hashnode.com/tag/closure)

## Written by

[kyip](https://hashnode.com/@yipcode)

@yipcode

  
[View profile](https://hashnode.com/@yipcode)

programmer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
