시작하기무료로 시작하기

Multiple dispatch

Multiple dispatch is one of the unique features of Julia, and it will help you write really neat and efficient code. Earlier in this chapter, you wrote some code to check whether a variable had the correct type for a function. With multiple dispatch we can handle different input types more effectively.

In this exercise, you will write a function that uses multiple dispatch.

이 연습은 강의의 일부입니다

Introduction to Julia

강의 보기

실습형 인터랙티브 연습

이 예제를 이 샘플 코드를 완성하여 풀어보세요.

# Write the negative function
____ ____(____)
	____ ____
____
코드 편집 및 실행