将功能转换为箭头功能

我正在尝试将功能转换为箭头功能,但无法正常工作。我在做一些错误吗,我的代码在下面。请引导我在哪里做错。

// Call Back Function 
 function ask(question, yes, no) { 
if (confirm(question)){
     yes()
 }
else {
    no()
}
}

function showOk() {
 console.log("you agreed")
}

function showCancel() {
console.log("canceled")
}

ask("do you agree ?", showOk, showCancel)


Arrow Function

let ask = (question, yes, no) => {if (confirm(question)) {
  yes()
} else {
  no()
}

let showOk = () => console.log("you agreed");

let showCancel = () => console.log("Canceled");
}
ask("do you agree ?", showOk, showCancel)