376034 (4) [Avatar] Offline
#1
This is a code sample from page 183.
I would like to ask: Isn't this not good functional programming practice in that the body of the getPhotoUrl function grabs photoArray from the outside instead of passing it into this function as an argument?

getPhotoUrl: Int -> String
getPhotoUrl index = 
  case Array.get index photoArray of
    Just photo -> photo.url
    Nothing -> ""