I'm a little confused about the definition for recursively enumerable languages in my script. A recursively enumerable language is defined as:
A language $A \subseteq \Sigma^*$ is called recursively enumerable, if $A = \emptyset$ or there exists a total and computable function $f: \mathbb{N} \to \Sigma^*$ with $A=\{f(0), f(1), f(2), ...\} := f(\mathbb{N})$. Then $f$ enumerates $A$.
However, the definitions that I found on Wikipedia and Youtube videos is rather different. For example, according to Wikipedia:
A recursively enumerable language is a formal language for which there exists a Turing machine (or other computable function) that will halt and accept when presented with any string in the language as input but may either halt and reject or loop forever when presented with a string not in the language.
The second definition makes more intuitive sense to me and also seems more widely accepted. What's the connection between the two definitions? From what I understand, the first definition essentially "numbers" each alphabet in $A$. But I'm not sure.