Top "Function-declaration" questions

the process of describing the type and identifier of a function.

How to provide explicit type declarations for functions when using GHCi?

How to I define the equivalent of this function (taken from learnyouahaskell) inside GHCi? import Data.List numUniques :: (Eq a) =&…

haskell types ghci function-declaration
Alternative (K&R) C syntax for function declaration versus prototypes

What is useful about this C syntax — using 'K&R' style function declarations? int func (p, p2) void* p; …

c function function-declaration kernighan-and-ritchie function-definition
Whyever **not** declare a function to be `constexpr`?

Any function that consists of a return statement only could be declared constexpr and thus will allow to be evaluated …

c++ c++11 constants constexpr function-declaration
Why does an empty declaration work for definitions with int arguments but not for float arguments?

I thought the difference is that declaration doesn't have parameter types... Why does this work: int fuc(); int fuc(int …

c function-declaration function-prototypes
Should a virtual c++ method implementation in .cpp file be marked virtual?

I have a virtual C++ method that I'm defining in a .h file and implementing in a .cc file. Should …

c++ oop virtual function-declaration
what does "->" mean in swift when declaring functions?

example function func example(titles: [String]) `->` [UIButton] { } and where could i find more docs on this topic (…

ios swift function-declaration
Why do functions need to be declared before they are used?

When reading through some answers to this question, I started wondering why the compiler actually does need to know about …

c++ function-declaration
extern declaration and function definition both in the same file

I was just browsing through gcc source files. In gcc.c, I found something like extern int main (int, char **); …

c declaration extern function-declaration
Does int main() need a declaration on C++?

When reading about functions in C++, I was taught that functions need declarations to be called. For example: #include <…

c++ main forward-declaration function-declaration
Swift - Take Nil as Argument in Generic Function with Optional Argument

I am trying to create a generic function that can take an optional argument. Here's what I have so far: …

swift function generics null function-declaration